Jump to content

Monkey Scripts


NotHereToPlayGames

Recommended Posts


  • 2 weeks later...

Here are a few I've found to be must-have's.

 

Disable AutoRefresh  --  https://greasyfork.org/en/scripts/16079-disable-autorefresh/code

 

Halt!  --  https://userscripts-mirror.org/scripts/review/125995

I personally use the one-liner version v0.0 but replace whitelist @include's to run on ALL http and https because I want the OPPOSITE effect of blacklist versus whitelist, ie RUN ON ALL until I tell it not to.

 

Disable Javascript setInterval and timers  --  https://kplug-list.kernel-panic.narkive.com/65G6iuYC/disable-javascript-setinterval-and-timers

 

Redirector (v0.1 post at bottom of page)  --  https://stackoverflow.com/questions/3168944/how-can-i-redirect-some-page-with-javascript-in-greasemonkey

Link to comment
Share on other sites

I use the open source Violentmonkey extension (WE, currently at version 2.12.14) in latest Serpent 52.9.0, as well as in 360EE...

VM being a WE, it can only affect web content, not browser looks (this is not possible in 360EE, of course, but I use Greasemonkey for Pale Moon in St52 to change several browser-GUI aspects...).

https://greasyfork.org/en/scripts/410687-google-shut-up

https://greasyfork.org/el/scripts/412178-youtube-dismiss-sign-in
(has some overlapping functionality with the previous one)

https://greasyfork.org/el/scripts/375525-youtube-age-verification-bypass
(works only for embeddable age-gated videos)

https://github.com/Mottie/GitHub-userscripts/wiki/GitHub-download-zip

https://greasyfork.org/el/scripts/407745-bypass-github-ajax
(in St52 and NM28, together with JustOff's GitHub Web Components Polyfill extension)

https://greasyfork.org/el/scripts/395497-login-reminder-popup-remover

https://github.com/Procyon-b/make-gis-great-again

https://github.com/Procyon-b/GitHub-sort-by-recently

https://cable.ayra.ch/tampermonkey/view.php?script=youtube_autoplay_disable.user.js
(a must have!)

https://cable.ayra.ch/tampermonkey/view.php?script=youtube_volume_normalizer.user.js

https://greasyfork.org/en/scripts/5566-youtube-links
(doesn't work in NM27)

https://greasyfork.org/en/scripts/377047-old-reddit-redirect

Link to comment
Share on other sites

1 hour ago, RainyShadow said:

You use both Greasemonkey and Violentmonkey at the same time in the same St52 profile?!

Yes, but no common userscripts are shared between them...

FWIW, I also have installed in that same St52 profile Stylem (a "legacy" userstyle manager, for styles that alter parts of the browser) and Stylus 1.14.23 (a WE userstyle manager) for styles that alter web pages - the latter also has support for the newer format of userstyle called UserCSS (offers configuration choices post-install); sadly, v1.14.23, the last compatible with St52, has become now quite old, several of the newer UserCSS styles won't install or previously installed versions won't update to the most current... :(

1 hour ago, RainyShadow said:

what GUI changes are you making with GM there

One such example is Old Reddit Favicon :

// ==UserScript==
// @name     Old Reddit Favicon
// @include  https://old.reddit.com/*
// @grant    none
// ==/UserScript==
(function () {
  var link = document.querySelector('link[rel*=\'icon\']') || document.createElement('link');
  link.type = 'image/x-icon';
  link.rel = 'shortcut icon';
  link.href = 'https://i.imgur.com/veJX9o5.png';
  document.getElementsByTagName('head') [0].appendChild(link);
}) ();

A WE (like VM) could never alter a tab's favicon for a given site... :P

Regards :)

Link to comment
Share on other sites

@VistaLover - Wow, five and a half of those are all just for YouTube.

Guess I just don't get that, I visit YouTube only 3 to 6 times per YEAR.

HUGE Stylus/Stylem fan.  I used Stylem to customize NM27/NM28/MyPal27 GUI quite a bit when they were my defaults.

I used to block favicons entirely back in my GreenBrowser + Proxomitron days.

Link to comment
Share on other sites

  • 2 weeks later...

Here's one to disable the worst invention known to man as far as I'm concerned (ie, blurry migraine-inducing anti-aliased sub-pixel font rendering)  --  https://userscripts-mirror.org/scripts/show/179933

I personally disable them via a Stylus User Style when uMatrix or NoScript doesn't suffice by themselves by blocking useless fonts, but it's nice to know that there's a User Script for the task as well.

Not really an XP issue but I use the same browser profile on my 7's and 10's.

Edited by ArcticFoxie
Link to comment
Share on other sites

  • 2 weeks later...

Does anybody know of a way (userscript? addon?) to automatically fill in date fields?

For example, one of my bill-pay websites have payment date fields where you enter the date to make the payment.

These fields STUPIDLY default to the DUE DATE.

I would like a userscript or an addon that would default these date fields to TODAY'S DATE *plus* two days.

ie, visit the bill-pay website today (5/13/21) and the date field is automatically filled with 5/15/21.

(This was a piece of cake using a web filter called PROXOMITRON, but I no longer really use it for a web browser proxy [I do still use it for Excel spreadsheet data queries] and would like an alternative solution.)

 

Any suggestions?

Edited by ArcticFoxie
Link to comment
Share on other sites

After some off-and-on research, I've been able to create my own userscript for my bill-pay website  :cheerleader:

I ended up opting for today + 3.

 

// ==UserScript==
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @grant GM_addStyle
// ==/UserScript==

var theDate = new Date();
var myNewDate = new Date(theDate);
myNewDate.setDate(myNewDate.getDate()+3);

var dd = String(myNewDate.getDate()).padStart(2, '0');
var mm = String(myNewDate.getMonth() + 1).padStart(2, '0');
var yyyy = myNewDate.getFullYear();

myNewDateFormatted = mm + '/' + dd + '/' + yyyy;

$("<CSS_SELECTOR_FOR_DATE_FIELD_YOU_ARE_TARGETING").val (myNewDateFormatted);

Link to comment
Share on other sites

  • 11 months later...

Credits to "BackStop" extension that was later revised by a different user to "Backstay" extension.

This prevents the "Backspace" key on the keyboard from being used as a shortcut for the "Back" browser button (a hard-coded default shortcut that cannot be edited via normal browser settings or shortcut extensions).

 

// ==UserScript==
// @name Disable Backspace
// @version 3.0.1
// @include http://*
// @include https://*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js
// @run-at document-start
// ==/UserScript==

var backstayCurrentLocation;

$(document).keydown(function(e) {
    // If backspace is pressed
    if (e.which === 8) {

        var active = $(document.activeElement);

        notEditable = function(element) {
            var edit = element.attr('contenteditable');

            // Ensure backspace still works on any element with contenteditable="true"
            if (typeof edit !== 'undefined' && edit !== false) {
                return true;
            } else if (element.is('input, textarea')) {
                return true;
            } else if (active.attr('type') == 'application/x-shockwave-flash' || active.attr('type') == 'application/x-silverlight-2') {
                return true;
            }
            return false;
        }
        return notEditable(active);
        window.onbeforeunload = function() {
            return "Backstay: Are you sure you want to navigate away?";
        }
    }
});

Link to comment
Share on other sites

  • 1 year later...

What - no polyfills? Here are a few contributed by n16s. Should be good on both Chrome (prior to version indicated) and FF-derived browsers.

// ==UserScript==
// @name Inject findLast() Polyfill [97]
// @version 0.0.1
// @match *://*/*
// @run-at document-start
// @grant none
// ==/UserScript==

if (!Array.prototype.findLast) {
  Object.defineProperty(Array.prototype, "findLast",
    {
      value: function (predicate, thisArg) {
        let idx = this.length - 1;
        while (idx >= 0) {
          const value = this[idx];
          if (predicate.call(thisArg, value, idx, this)) {
            return value;
          }
          idx--;
        }
        return undefined;
      }
      ,
      writable: true,
      enumerable: false,
      configurable: true
    });
}

// ==UserScript==
// @name Inject findLastIndex() Polyfill [97]
// @version 0.0.1
// @match *://*/*
// @run-at document-start
// @grant none
// ==/UserScript==

if (!Array.prototype.findLastIndex) {
  Object.defineProperty(Array.prototype, "findLastIndex",
    {
      value: function (predicate, thisArg) {
        let idx = this.length - 1;
        while (idx >= 0) {
          const value = this[idx];
          if (predicate.call(thisArg, value, idx, this)) {
            return idx;
          }
          idx--;
        }
        return -1;
      }
      ,
      writable: true,
      enumerable: false,
      configurable: true
    });
}

// ==UserScript==
// @name Inject randomUUID() Polyfill [92]
// @version 0.0.1
// @match *://*/*
// @run-at document-start
// @grant none
// ==/UserScript==

if (!('randomUUID' in crypto))
  crypto.randomUUID = function randomUUID() {
    return (
      [1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,
      c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
    );
  }; 

 

Link to comment
Share on other sites

And here's @UCyborg's polyfill for structuredClone (Chrome before v.98; K-Meleon, New Moon 27, FF 45; not needed on UXP-based browsers or Serpent 55)

 // ==UserScript==
// @name Inject structuredClone() Polyfill [98]
// @version 0.0.1
// @match *://*/*
// @run-at document-start
// @grant none
// ==/UserScript==

if (typeof self.structuredClone !== "function") {
  self.structuredClone = function (value) {
    if (Array.isArray(value)) {
      const count = value.length;
      let arr = new Array(count);
      for (let i = 0; i < count; i++) {
        arr = self.structuredClone(value);
      }
      return arr;
    } else if (typeof value === "object") {
        let obj = {};
        for (const prop in value) {
          obj[prop] = self.structuredClone(value[prop]);
        }
        return obj;
    } else {
        return value;
    }
  }
} 

This will fail if an array or object property references itself, but works well in most cases.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...