您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A.T.T
当前为
// ==UserScript== // @name Weibo Classic (恢复微博V5) // @namespace https://github.com/adelabs // @description A.T.T // @version 2.0 // @license GPL version 3 // @include *://weibo.com/* // @include *://.weibo.com/* // @grant none // @run-at document-start // ==/UserScript== //http://www.w3schools.com/js/js_cookies.asp function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires + "; domain=.weibo.com; path=/"; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i<ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) != -1) return c.substring(name.length, c.length); } return ""; } setCookie('wvr6', '0', -1); setCookie('wvr6', '0', 999); console.log(getCookie('wvr6')); console.log(window.location.toString()); if (window.location.search.indexOf('wvr=5') != -1) { var new_href = (window.location.protocal || 'http:') + '//' + window.location.host + window.location.pathname + '?upfrom=v5'; console.log(new_href); location.href = new_href; }