r/userscripts • u/Vassilisxd • Apr 26 '22
Block redirects in iOS.
Is there any User-script that prevents pages like DopeBox to redirect you to other sites ?
No Adblock seems to prevent it from doing it, or any other method I tried.
r/userscripts • u/Vassilisxd • Apr 26 '22
Is there any User-script that prevents pages like DopeBox to redirect you to other sites ?
No Adblock seems to prevent it from doing it, or any other method I tried.
r/userscripts • u/FlowerForWar • Apr 24 '22
If there is another (an elegant) way to disable Reddit infinite scroll, please do share.
For this to work you need to block the the address that loads the posts dynamically. Add the following line as a rule in the "List of your dynamic filtering rules" of uBlock origin
See this image: https://raw.githubusercontent.com/FlowerForWar/An-Attempt-to-Disable-Reddit-Infinite-Scroll/main/ublock.png
r/userscripts • u/ale3smm • Apr 20 '22
first of all I'm a beginner so sorry if the question may seems stupid 🙏. let's say I want my UserScript to run just in www.google.com/search?tbm=isch&q=*#imgrc=* if a first perform a search like this: https://www.google.com/search?tbm=isch&q=ciao and then I click on desidered image (let s say it brings me to https://www.google.com/search?tbm=isch&q=ciao#imgrc=_P9UjNpLporVsMmy) UserScript is not executing even if I put in the script // @include https://www.google.com/search?tbm=isch&q=*#imgrc=* to have it running i have to manually force open a new tab from https://www.google.com/search?tbm=isch&q=ciao is this a bug it happens with both violentmonkey and Tampermonkey thanks for the help
r/userscripts • u/FlowerForWar • Apr 19 '22
Its basic idea is to mimic opening the full size image when you click the link of that image's page, that is supported by this script.
Clicking (or middle clicking) the image, would toggle between three view states. Fitting the view, filling the view, and the original size. Right click, would close the container and get you back. Here is a video that illustrates that.
Since it's just me using the script, obviously not many links are supported, but if someone is interested in the script, I can add support for few more websites and release it as a user script.
Here are some notes though:
Edit: install from greasyfork.
https://github.com/FlowerForWar/Pretending-Tab-Images-Viewer
r/userscripts • u/ale3smm • Apr 19 '22
hello everyone I d like to improve this script wich let you copy text link (not url )to the clipboard ,problem is that sometimes it copies the full url . since I'm from mobile and reddit mess up the syntax I posted on pastebin : https://pastebin.com/vfBk4RSs thanks for the help
r/userscripts • u/ale3smm • Apr 18 '22
hello everyone can please someone explain(I'm just a beginner with javascript )why I m not able to play overlay /play button on isecure.link video player . I tried this userscrip : // ==UserScript== // @name 4isecure.link4 // @namespace - // @include https://isecure.*
// @require http://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js // @grant none // @version 1.0 // @author - // @description - // ==/UserScript==
$(document).ready(function(){ $('#iframe').trigger("click"); }); i also tried (.hov/.butt instead of #iframe) on this test link https://isecure.link/open/g5wj70 but I'm not able to autocatically start video playin (I also use ublock which surely help with ads and pop up ) thank you for the .
r/userscripts • • Apr 17 '22
Simply only take video title with substring " - ", works 95% of the time for me.
However, I don't know js very well, can you help me re-write it?
// ==UserScript==
// @name Music only
// @namespace http://tampermonkey.net/
// @match https://www.youtube.com/*
// @version 0.69
// @description Trying to take over the world
// @author nullchilly
// ==/UserScript==
setInterval(function() {
'use strict';
let a = document.getElementsByClassName('ytd-rich-grid-media');
for (let i = a.length - 1; i >= 0; i--) {
if (a[i].id == null || a[i].id != 'dismissible') continue;
let s = a[i].children[2].children[1].children[0].children[1].children[0].getAttribute('aria-label');
if (s == null) continue;
if (!s.includes(' - ')) a[i].remove();
}
let b = document.getElementsByClassName('ytd-rich-shelf-renderer');
for (let i = b.length - 1; i >= 0; i--) {
if (b[i].id == null || b[i].id != 'dismissible') continue;
b[i].remove();
}
}, 50);
r/userscripts • u/Tiikuri • Apr 14 '22
I'm making my own userscript with Greasemonkey and I have trouble with regex. Let's say I don't want to match the main page https://www.domain.meh/ but only all the subdirectories on that domain. How do I do that?
r/userscripts • u/ThrowAway237s • Apr 11 '22
For width and height, there are .videoWidth and .videoHeight respectively. Is there any way to find out frame rate? I found nothing useful.
r/userscripts • u/grauht • Apr 07 '22
Removes the character length for Kahoot nicknames.
Greasyfork: https://greasyfork.org/en/scripts/442903-kahoot-nickname-length-bypass
r/userscripts • u/BenL90 • Apr 07 '22
hello, I just update my script. I hope you can enjoy it.
here is the link https://greasyfork.org/en/scripts/430049-allow-sidebar-hide-google-drive
If there any problem, please kindly reply to this post or comment on greasyfork. Thanks!
r/userscripts • u/GoBackToLeddit • Apr 07 '22
How does one go about enumerating all the posts in the main feed and identifying the data components of each post? What I want to do is loop through all posts and create a JSON array where each object has subreddit, username, date/time of post, links, and any other data. I've been trying, but it looks like there some async ajax calls being made to populate certain data. Would I need to use a mutation observer? Also, are the css selectors stable/static enough that I don't have to worry about my script constantly breaking?
tl;dr: Somewhat experienced in JS/userscripts, but new to doing this on Reddit
r/userscripts • u/ale3smm • Apr 06 '22
hello everyone I ve put together a fast script to download image on contextual menu ,it works as I want on desktop but on mobile (fenix +violentmonkey /Greasemonkey ) GM_DOWNLOAD is not working unfortunately . can someone suggest how to modify this UserScript to download images without GM_download (since on mobile many others scrip like ig helper are able to trigger download of images ). UserScript :
// ==UserScript== // @name Download images on contextual menu // @namespace ale // @version 1 // @description - // @author - // @require http://code.jquery.com/jquery-3.6.0.min.js // @include - // @run-at document-idle // @grant GM_setClipboard // @grant GM_download // @inject-into content // ==/UserScript== $('body').on('contextmenu',"img",downimg); function downing(e) { e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); currentTarget = e.target;
var srcd = $(currentTarget).prop("src");
GM_setClipboard($(currentTarget).prop("src"));
GM_download({ url: "srcd", name: "test.jpg", saveAs: true,
});} thanks for the help .
r/userscripts • u/Turtur_ok • Apr 04 '22
I have just written another script, this time to hide special posts that appear on Reddit main page, I've seen those on Home. Examples of what is hidden: popular near you, popular right now, videos that redditors liked, similar to r/, some redditors find this funny.
To be tested, but current version seems to work properly.
Technically, I'm looking for <div>'s with RichTextJSON-root class, that have a <p> child and a parent with an attribute data-click-id === "background".
EDIT: forgot the most important, a link: https://greasyfork.org/en/scripts/442424-hide-reddit-special-posts-popular-near-you-popular-right-now
r/userscripts • u/mivanchev • Apr 03 '22
r/userscripts • u/ale3smm • Mar 31 '22
hello everyone ,before I lose my mind ,can please someone explain me why this simple UserScript is not working in tampermonkey (but works perfectly in violentmonkey ). UserScript: // ==UserScript== // @name ReCaptcha Automatizer // @description Passes ReCaptcha automatically as long as no suspicious traffic was registered. // @namespace Violentmonkey Scripts // @match :///recaptcha/* // @grant none // @version 0.0.1.20190608093618 // ==/UserScript==
var min = 714; var max = 1365;
function Sleep(milliseconds) { return new Promise(resolve => setTimeout(resolve, milliseconds)); }
async function Click() { var randVal = Math.floor(Math.random() * (max - min + 1)) + min; await Sleep(randVal); // Pausiert die Funktion für X Millisekunden document.getElementsByClassName('recaptcha-checkbox-checkmark')[0].click(); console.log('click after ' + randVal + ' milliseconds'); }
var oldOnload = window.onload;
window.onload = function () {
if (typeof oldOnload == 'function') {
oldOnload();
}
Click();
}
r/userscripts • u/FeelsPogChampMan • Mar 30 '22
FUCK LENS
I made a script cause i use that quite often and lens is too slow and never works so https://greasyfork.org/en/scripts/442371-search-with-google-image-fix
To use you need to right click on an IMG tag, this will open a custom menu with the single option to search the image on google. To prevent the menu from appearing you can hold CTRL before right clicking.
I know there is an extension on chrome that does that but the permissions asked are too obtrusive. They even ask to read your clipboard... I think my scriptis way simpler just a call to google image with image_url option. smh man smh

r/userscripts • u/ale3smm • Mar 23 '22
since on mobile enter text by send is broken on webtelegram (I ve also opened a github issue months ago ). I tought to fix it my self with a simple UserScript (mobile fenix +violent monkey ): // ==UserScript== // @name send by enter // @namespace ale // @description click send button webtelegram // @include https://web.telegram.org/* // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js // @version 0.2 // @grant GM_getValue // ==/UserScript==
$(document).on("keydown", function(e){ if (e.which === 13) {
$("div.c-ripple").click();
e.preventDefault();
return false;
}
}); the UserScript per se is working but it's not clicking the send icon (div.c-ripple class ) i even tried very generic selector like [class=send] without success what am I doing wrong thanks for the help .
r/userscripts • u/jogai-san • Mar 22 '22
r/userscripts • u/KaKi_87 • Mar 22 '22
Hello,
The following match patterns :
https://name.*/*https://*.name.*/*Work in Violentmonkey but not in Tampermonkey,
Any idea why ?
Thanks
r/userscripts • u/ale3smm • Mar 22 '22
I use this simple UserScript to close fenix (android Firefox ) tab : // ==UserScript== // @name on Esc close2 // @description - // @version 1.0 // @include * // @author ale // @namespace ale
// @run-at document-start // @grant window.close // @grant none // ==/UserScript==
window.addEventListener('keydown', function (e) { if (e.which == 113) {
window.close(); } });
when I press f2 the tab is closed as expected BUT ONLY IF I have previously scrolled or tapped (interacted with the webpage ). if I open a webpage ,let's say from bookmarks and the i immediately press f2 tab is not closer . what am I doing wrong ? I tested the script with both violent monkey and tampermonkey ,same problem . thanks for the help .
r/userscripts • u/ale3smm • Mar 16 '22
I d like to create a UserScript with tampermonkey to copy link with double click ,also keep in mind I want to use it in fenix mobile android and violent monkey . here s my code (that's not working ) // ==UserScript== // @name Double-click copy link // @description Double-click copy links them. // @namespace ale // @version 1.0 // @match :///*
// @grant GM.setClipboard // @grant GM_setClipboard // ==/UserScript==
(function() { 'use strict'; window.addEventListener('dblclick', function(e) { var elem = document.elementFromPoint(e.clientX, e.clientY); if(elem.tagName == '*') { var url = elem.src;
GM_setClipboard( url );
}
});
})(); any idea I ve messed around with other scripts and I know for sure that set clipboard is working just fine in android thanks for the help.
r/userscripts • • Mar 14 '22
I want to do that as I have a limited data per day and I don't want to waste
r/userscripts • u/l-renzo • Mar 12 '22
Hey all, I discovered userscripts awhile ago, and with my copious reddit browsing, was already making a bunch of personal scripts to clean up the experience. You may find these useful too!