Add userscript to show images from bandcamp.com and theatlantic.com without JS - dotfiles - leot's dotfiles
HTML hg clone https://bitbucket.org/iamleot/dotfiles
DIR Log
DIR Files
DIR Refs
---
DIR changeset afed6ee58fbf7d382ceb990b48280b168eed06e6
DIR parent 577a8a057d3bcf110b61568db8b2a0ec64ee8009
HTML Author: Leonardo Taccari <iamleot@gmail.com>
Date: Thu, 25 Oct 2018 23:22:16
Add userscript to show images from bandcamp.com and theatlantic.com without JS
Diffstat:
config/vimb/scripts.js | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff -r 577a8a057d3b -r afed6ee58fbf config/vimb/scripts.js
--- a/config/vimb/scripts.js Sat Oct 20 14:27:57 2018 +0200
+++ b/config/vimb/scripts.js Thu Oct 25 23:22:16 2018 +0200
@@ -1,3 +1,15 @@
+// ==UserScript==
+// @name bandcamp
+// @description Show images from Bandcamp without JavaScript
+// @include http*://bandcamp.com/*
+// ==/UserScript==
+function userscript_bandcamp()
+{
+ document.querySelectorAll("img[data-original]").forEach(function(e) {
+ e.src = e.getAttribute("data-original");
+ });
+}
+
// ==UserScript==
// @name economist
// @description Remove ads from Economist
@@ -141,6 +153,19 @@
}
// ==UserScript==
+// @name theatlantic
+// @description Show images from The Atlantic without JavaScript
+// @include http*://www.theatlantic.com/*
+// ==/UserScript==
+function userscript_theatlantic()
+{
+ document.querySelectorAll("img[data-src]").forEach(function(e) {
+ e.src = e.getAttribute("data-src");
+ e.style["opacity"] = 100;
+ });
+}
+
+// ==UserScript==
// @name theverge
// @description Remove the privacy consent footer
// @include http*://www.theverge.com/*