JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add skip-splash
[userscripts.git] / skip-splash.user.js
diff --git a/skip-splash.user.js b/skip-splash.user.js
new file mode 100644 (file)
index 0000000..eb3504f
--- /dev/null
@@ -0,0 +1,30 @@
+// ==UserScript==
+// @name        auto-go-to-image
+// @namespace   https://jasonwoof.com/
+// @grant       none
+// @description skip splash screen on image hosting sites
+// @version     5
+// ==/UserScript==
+
+(function() 
+{
+       var add_css = function(css) { 
+               var style = document.createElement("style"); 
+               style.type = "text/css"; 
+               style.appendChild(document.createTextNode(css)); 
+               document.getElementsByTagName("head")[0].appendChild(style); 
+       } 
+
+       add_css(
+               "#overlayBg.overlayBg, #popupOverlay.popupOverlay { display: none !important; } " +
+               // "#main_image, #imagen img, #shortURL-content img { width: auto !important; height: auto !important; max-height: none !important; }" +
+               "img { width: auto !important; height: auto !important; max-height: none !important; } " +
+               "#resized { display: none !important; } " +
+               "#full_image { max-width: 100% !important; position: absolute !important; z-index: 10; } "
+       );
+
+       // this should zoom into the image on imgnip.com anyway
+       // window.addEventListener("load", function(e) {
+       // setTimeout(function() {window.adjustImage();}, 1000);
+       // }, false);
+})();