// ==UserScript== // @name Github Compat For Chrome // @name:zh-CN Github兼容性优化,Chrome版 // @namespace https://greasyfork.org/users/159546 // @version 1.0.1 // @description Fix Github problem while using Chrome if needed. // @description:zh-CN 优化Github在Chrome浏览器上的使用体验和兼容性,如果需要这么做。 // @author LEORChn // @include *://github.com/* // @run-at document-start // @grant none // @downloadURL none // ==/UserScript== /* Loading order of compat js: (same order can be load by async) 1 - assets/compat-(*).js 1 - assets/frameworks-(*).js 2 - assets/github-(*).js Be affected method: 1 - jsCompat() 2 - load() Use this User-Agent to update js compat packs' link in the HTML page: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko */ var inited=false; (function() { recheck(); })(); function recheck(){ init(); if(load())return; setTimeout(recheck,100); } function init(){ // call once when start loading page if(inited) return; if(ft('body').length==0) return; // jsRemove(); jsCompat(); rmViews(); inited=true; } function rmViews(){ var d; d=fc('signup-prompt-bg')[0]; if(d)d.remove(); d=fc('unsupported-browser')[0]; if(d)d.remove(); } /*function jsRemove(){ // remove assets/unsupported-(*).js if needed var spt=ft('script'); for(var i=0,len=spt.length;i