diff tweetdeck-large-image.user.js @ 49:2e1cae72a63e

Semicolons
author nanaya <me@nanaya.pro>
date Thu, 12 Oct 2017 16:40:13 +0900
parents 32a213717e6a
children 19c391840d4a
line wrap: on
line diff
--- a/tweetdeck-large-image.user.js	Wed Oct 11 22:22:06 2017 +0900
+++ b/tweetdeck-large-image.user.js	Thu Oct 12 16:40:13 2017 +0900
@@ -12,23 +12,23 @@
 ;(function() {
   "use strict";
 
-  var $ = jQuery
+  var $ = jQuery;
   var replaceLink = function(e) {
-    var link = e.currentTarget
-    if (link._ecUserscript === true) { return }
+    var link = e.currentTarget;
+    if (link._ecUserscript === true) { return; }
     
-    var images = link.getElementsByClassName("media-img")
+    var images = link.getElementsByClassName("media-img");
     
-    var url
+    var url;
     if (images.length) {
-      url = images[0].src.replace(/:[a-z0-9]+$/, "")
+      url = images[0].src.replace(/:[a-z0-9]+$/, "");
     } else {
-      url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, "$2")
+      url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, "$2");
     }
-    link.setAttribute("href", url + ":orig")
-    link._ecUserscript = true
-  }
+    link.setAttribute("href", url + ":orig");
+    link._ecUserscript = true;
+  };
   
-  $(document).off(".ec-userscript")
-  $(document).on("mouseenter.ec-userscript", ".js-media-image-link", replaceLink)
+  $(document).off(".ec-userscript");
+  $(document).on("mouseenter.ec-userscript", ".js-media-image-link", replaceLink);
 }).call();
\ No newline at end of file