diff tgsmart-direct-link.user.js @ 33:28505554a8b9

(none)
author Edho Arief <me@myconan.net>
date Sun, 25 Dec 2016 07:41:17 +0000
parents d7cfa95436f9
children 32a213717e6a
line wrap: on
line diff
--- a/tgsmart-direct-link.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/tgsmart-direct-link.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         TG Smart Nuke Out Tracking Function
 // @namespace    https://myconan.net
-// @version      1.0.0
+// @version      1.0.1
 // @description  Remove tracking function from links in TG Smart
 // @author       nanaya
 // @match        http://www.tgsmart.jp/*
@@ -10,10 +10,11 @@
 // ==/UserScript==
 
 ;(function() {
-  Array.prototype.forEach.call(
-    document.querySelectorAll('a[onclick^="trackOutboundLink("'),
-    function(el) {
-      el.setAttribute("onclick", "");
-    }
-  )
+  "use strict";
+  var links = document.querySelectorAll("a[onclick^='trackOutboundLink('")
+  var removeOnClick = function(el) {
+    el.setAttribute("onclick", "")
+  }
+
+  Array.prototype.forEach.call(links, removeOnClick)
 }).call();
\ No newline at end of file