// ==UserScript== // @name twitter_ex // @description twitter enhanced // @namespace http://userscripts.org/users/ // @match https://twitter.com/* // @match https://www.twitter.com/* // @version 0.4 // @grant none // @downloadURL https://update.greasyfork.icu/scripts/17646/twitter_ex.user.js // @updateURL https://update.greasyfork.icu/scripts/17646/twitter_ex.meta.js // ==/UserScript== HTMLDocument.prototype.createElementHTML=function (content) { var mock=this.createElement("div"); mock.innerHTML=content; return mock.firstChild; } HTMLElement.prototype.observe=function (func) { var ts=this; var trigger={ timer : null, callback : func, ontrig : function(){ var t=this; if (!t.timer) { t.timer=setTimeout(function(){ clearTimeout(t.timer); t.timer=null; t.callback(); }, 300, false); } }, }; var obs=new (window.MutationObserver||window.WebKitMutationObserver)(trigger.ontrig.bind(trigger)); window.addEventListener("unload", function(event){ obs.disconnect(); }); obs.observe(ts, {attributes: true, childList: true, subtree: true}); } HTMLElement.prototype.removeSelf=function() { this.parentNode.removeChild(this); } function new_topbar() { var glbnav=document.querySelector("ul#global-actions"); if (glbnav) { var html_fav='