Add initial scripts.js - dotfiles - leot's dotfiles
 (HTM) hg clone https://bitbucket.org/iamleot/dotfiles
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) changeset 9aec3293e2f76109b4cd9b0b6986b683ed53ad10
 (DIR) parent 255dbda39ff071b7721c05c7a7abd00193fca0a8
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Wed, 10 Oct 2018 23:52:02 
       
       Add initial scripts.js
       
       Just a cat of all userscripts written for luakit and now isolated in function so
       can be called via vimb :augroup automatic commands.
       
       Diffstat:
        config/vimb/scripts.js |  161 +++++++++++++++++++++++++++++++++++++++++++++++++
        1 files changed, 161 insertions(+), 0 deletions(-)
       ---
       diff -r 255dbda39ff0 -r 9aec3293e2f7 config/vimb/scripts.js
       --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
       +++ b/config/vimb/scripts.js    Wed Oct 10 23:52:02 2018 +0200
       @@ -0,0 +1,161 @@
       +// ==UserScript==
       +// @name economist
       +// @description Remove ads from Economist
       +// @include http*://www.economist.com/*
       +// ==/UserScript==
       +function userscript_economist()
       +{
       +       document.querySelectorAll("div.fe-blogs__top-ad-wrapper").forEach(function(e) {
       +               e.remove();
       +       });
       +}
       +
       +// ==UserScript==
       +// @name github
       +// @description Remove signup banners from GitHub
       +// @include http*://github.com/*
       +// ==/UserScript==
       +function userscript_github()
       +{
       +       [".signup-prompt-bg"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +}
       +
       +// ==UserScript==
       +// @name internazionale
       +// @description Remove ads from Internazionale
       +// @include http*://www.internazionale.it/*
       +// ==/UserScript==
       +function userscript_internazionale()
       +{
       +       [".ads_content_top", ".content_adv", ".hentry--banner", ".wrapAd"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +}
       +
       +// ==UserScript==
       +// @name medium
       +// @description Remove bar and bottom banner on Medium
       +// @include http*://medium.com/*
       +// @include http*://hackernoon.com/*
       +// ==/UserScript==
       +function userscript_medium()
       +{
       +       ["div.metabar", "div.u-bottom0"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +}
       +
       +// ==UserScript==
       +// @name nytimes
       +// @description Remove top and bottom banners on The New York Times
       +// @include http*://www.nytimes.com/*
       +// ==/UserScript==
       +function userscript_nytimes()
       +{
       +       ["#top-wrapper", "#bottom-wrapper"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +}
       +
       +// ==UserScript==
       +// @name ondarock
       +// @description Remove the bottom banner on OndaRock
       +// @include http*://www.ondarock.it/*
       +// ==/UserScript==
       +function userscript_ondarock()
       +{
       +       e = document.querySelector("#bottom-banner");
       +       if (e) {
       +               e.remove();
       +       }
       +}
       +
       +// ==UserScript==
       +// @name stackoverflow
       +// @description Remove footers from stackoverflow
       +// @include http*://stackoverflow.com/*
       +// ==/UserScript==
       +function userscript_stackoverflow()
       +{
       +       ["#js-gdpr-consent-banner", ".js-dismissable-hero"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +}
       +
       +// ==UserScript==
       +// @name technologyreview-download
       +// @description Show just the article of The Download
       +// @include http*://www.technologyreview.com/the-download/*/*
       +// ==/UserScript==
       +function userscript_technologyreview_download()
       +{
       +       a = document.querySelector("article");
       +       if (a) {
       +               document.body.replaceWith(a);
       +       }
       +}
       +
       +// ==UserScript==
       +// @name technologyreview
       +// @description Remove the counter at the bottom of the page
       +// @include http*://www.technologyreview.com/s/*
       +// ==/UserScript==
       +function userscript_technologyreview()
       +{
       +       e = document.querySelector("div.meter");
       +       if (e) {
       +               e.remove();
       +       }
       +}
       +
       +// ==UserScript==
       +// @name twitter
       +// @description Adjust and clean up timeline of Mobile Twitter
       +// @include http*://twitter.com/*
       +// @include http*://mobile.twitter.com/*
       +// ==/UserScript==
       +function userscript_twitter()
       +{
       +       if (window.location.href.search('://twitter.com/') != -1) {
       +               window.location.href = window.location.href.replace('://twitter.com/', '://mobile.twitter.com/');
       +       }
       +
       +       ["#brand_bar", ".toast", "#footer"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +
       +       a = document.querySelector("#container");
       +       if (a) {
       +               a.style.width = "640px";
       +               a.style.marginTop = "20px";
       +               a.style.borderWidth = "1px";
       +       }
       +}
       +
       +// ==UserScript==
       +// @name wsj-amp
       +// @description Remove annoying containers on AMP wsj.com pages
       +// @include http*://www.wsj.com/amp/*
       +// ==/UserScript==
       +function userscript_wsj_amp()
       +{
       +       [".login-section-container", ".wsj-ad", "amp-geo", "amp-consent"].forEach(function(c) {
       +               document.querySelectorAll(c).forEach(function(e) {
       +                       e.remove();
       +               });
       +       });
       +}