Greasy Fork is available in English.
Deletes VK.com url redirects
当前为
// ==UserScript==
// @name vk.com del redir
// @version 1.0
// @description Deletes VK.com url redirects
// @author AndShy
// @match http://vk.com/*
// @match https://vk.com/*
// @license GPL-3.0
// @homepageURL http://greasyfork.icu/en/users/384289-andshy
// @run-at document-end
// @grant none
// @namespace http://greasyfork.icu/users/384289
// ==/UserScript==
(function() {
'use strict';
document.onmouseover = handler;
function handler(event) {
var evt = event.target
if (evt) {
//console.log(evt.tagName)
if (evt.tagName.includes('A')) {
//console.log(evt.href)
if (evt.href){
//console.log(decodeURIComponent(evt.href))
var link = decodeURIComponent(evt.href)
evt.href = link.replace(/^(?:http.?.*\?to\=)(.*?)(?:\&.*)?$/,'$1')
}
}
}
}
})();