Skip to content

Instantly share code, notes, and snippets.

@alphakevin
Last active March 19, 2021 05:54
Show Gist options
  • Save alphakevin/8e3e1bd652d94076db7d5bccf7bf67a6 to your computer and use it in GitHub Desktop.
Save alphakevin/8e3e1bd652d94076db7d5bccf7bf67a6 to your computer and use it in GitHub Desktop.
User Script for wechat redirect
// ==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