Last active
March 19, 2021 05:54
-
-
Save alphakevin/8e3e1bd652d94076db7d5bccf7bf67a6 to your computer and use it in GitHub Desktop.
User Script for wechat redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Wechat Redirect | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take back our freedom to visit internet! | |
// @author alphakevin | |
// @match https://weixin110.qq.com/cgi-bin/mmspamsupport-bin/newredirectconfirmcgi?* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function decode(uri) { | |
return decodeURIComponent(uri.replace(/&#x(\w\w);/g, '%$1')); | |
} | |
if (window.cgiData && window.cgiData.url) { | |
const url = decode(window.cgiData.url); | |
window.location.replace(url); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment