afeeee / api vk

// ==UserScript==
// @name api vk
// @namespace http://tampermonkey.net/
// @version 1
// @description open api.vk.com
// @author kazaev
// @match https://vk.com/*
// @icon https://www.google.com/s2/favicons?domain=vk.com
// @license MIT
// @grant none
// @copyright 2021, afeeee (https://openuserjs.org/users/afeeee)
// ==/UserScript==

document.onkeydown = function (e) {
  if (e.ctrlKey) {
    switch (e.keyCode) {
      case 68: // key D
        var method = document.getElementsByClassName("dev_method_header")[0].baseURI;
        window.open(method.replace("vk.com/dev", "api.vk.com/method").replace(new RegExp("params", "g"), "").replace(new RegExp("\\[", "g"), "").replace(new RegExp("\\]", "g"), "") + "&access_token=token");
        window.open("https://vkhost.github.io");
        return false;
    }
  }
}