Mercurial > ec-userscripts
view tgsmart-direct-link.user.js @ 55:19c391840d4a
Rewrite the whole thing to use observer instead
And holy crap plain javascript is stupid. Doesn't help I'm not using smarter loop method.
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 07 Jul 2018 01:29:36 +0900 |
parents | 2e1cae72a63e |
children |
line wrap: on
line source
// ==UserScript== // @name TG Smart Nuke Out Tracking Function // @namespace https://myconan.net // @version 1.0.1 // @description Remove tracking function from links in TG Smart // @author nanaya // @match http://www.tgsmart.jp/* // @grant none // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/tgsmart-direct-link.user.js // ==/UserScript== ;(function() { "use strict"; var links = document.querySelectorAll("a[onclick^='trackOutboundLink('"); var removeOnClick = function(el) { el.setAttribute("onclick", ""); }; Array.prototype.forEach.call(links, removeOnClick); }).call();