I had to use uBlock Origin to block a particular script with a rule. I can't even remember how I did it, I think with the logger, and it shows up under My rules
as
I had to use uBlock Origin to block a particular script with a rule. I can't even remember how I did it, I think with the logger, and it shows up under My rules
as
The source now contains a reference to a script at https://goomaphy.com/401/7287189 (blocked by the EasyList filters) - changing the src to this may work. There's also a long inline script and I am not sure what it does!
The source now contains a reference to a script at https://goomaphy.com/401/7287189 (blocked by the EasyList filters) - changing the src to this may work. There's also a long inline script and I am not sure what it does!
generated another userscript for use on the coli to basically replace .mp4 , .webm and m3u8 video links and embed a html5 video player that plays those links. the @match coul be modified to support any other site too.
used llama-3-sonar-large-32k-chat
Code:
// ==UserScript==
// @name Replace Video Links with HTML5 Player
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Replace video links with HTML5 player on XenForo.com
// @author Your Name
// @match https://www.thecoli.com/threads/*
// @match https://thecoli.com/threads/*
// @match https://www.thecoli.com/forums/*/post-thread
// @match https://thecoli.com/forums/*/post-thread
// @match https://www.thecoli.com/conversations/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var replacedLinks = {};
function replaceVideoLinks() {
var links = document.querySelectorAll('a[href*=".mp4"], a[href*=".m3u8"], a[href*=".webm"]');
links.forEach(function(link) {
if (!replacedLinks[link.href]) {
var videoUrl = link.href;
var videoElement = document.createElement('video');
videoElement.src = videoUrl;
videoElement.controls = true;
videoElement.style.width = '100%';
videoElement.style.height = '100%';
videoElement.style.objectFit = 'contain';
link.parentNode.replaceChild(videoElement, link);
replacedLinks[link.href] = true;
}
});
requestAnimationFrame(replaceVideoLinks);
}
replaceVideoLinks();
})();
From a cursory search, to block JS with JS, a MutationObserver is required
but! It looks like one of the inline scripts pulls the content of another script from gossishauphy and then creates the script with document.createElement.
Though I'm not sure how to apply this to a script that is essentially generated on the fly (or on page load). I don't even use Twstalker any more but this is annoying me
This says it blocks the script in the console as expected, but popunders still happen.
Code:
// Create a MutationObserver to observe changes in the DOM
const observer = new MutationObserver((mutationsList) => {
for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
// Check for added script elements
mutation.addedNodes.forEach((node) => {
if (node.tagName === 'SCRIPT' && node.src.includes('gossishauphy.com', 'goomaphy.com')) {
// Remove the script element to prevent it from executing
node.remove();
console.log('Blocked script from:', node.src);
}
});
}
}
});
// Start observing the document for changes
observer.observe(document, { childList: true, subtree: true });
This is the (second) offending script (I can't post when I copy it so I'll screenshot), maybe you could just modify the HTML to remove the variables at the start or something? :p
I used llama-3.1-sonar-large-128k-chat LLM to create a userscript that redirects urls on urlex.org in tandem with the redirector addon/extension. urlex.org is a url-unshortner/url-expander website and resolves short urls etc. i no longer wanted to have to manually click the unshortened url so thats why this userscript exists. you can use it as an example for a similar url shortening service. i didn't do indepth research into url-unshortners. this was just the first result i got and i created a redirector rule for it which i have been using for 2 weeks now.
A.I generated explanation:
This script is designed to work on the website urlex.org. When you visit a page on this site, it automatically checks for links in the table cells. It ignores the first link (which is usually a shortened URL like t.co / Twitter) and finds the second link. Once it finds this second link, it loads that URL in your browser window. In short, it helps you skip over shortened URLs and directly load the actual URL you're interested in.
Code:
// ==UserScript==
// @name Load Second Column URL on urlex.org
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Load Second Column URL on urlex.org
// @author You
// @match https://urlex.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to check if element is present and execute replacement logic
function checkAndLoad() {
// Select all anchor tags within table cells
var links = document.querySelectorAll('td a');
if (links.length > 1) {
console.log("Found", links.length, "anchor tags within table cells");
// Loop through each link and find second column URL
for (var i = 0; i < links.length; i++) {
var link = links[i];
console.log("Processing link:", link.href);
// Ignore first column URL (typically https://t.co)
if (i === 1) {
console.log("Found second column URL:", link.href);
// Load this second column URL in same window's address bar
window.location.href = link.href;
console.log("Redirecting to second column URL:", link.href);
// Remove interval since we've found and processed elements
clearInterval(interval);
break;
}
}
}
}
// Check every second for presence of required elements
var interval = setInterval(checkAndLoad, 1000);
})();
this was my redirector rule because i didn't want to unblock in my hosts file, only on one browser.
Edit Redirect
Description:
https://t.co/ to https://urlex.org
Example URL:
https://t.co/ocBSKTQjyF
Include pattern:
^(https://t.co/.*)
Redirect to:
https://urlex.org/$1
Pattern type:
Regular Expression
Pattern Description:
Example result:
https://urlex.org/https://t.co/ocBSKTQjyF
edit:
just created a second similar userscript for another url-unshortner called
based on the first since that service has 100/day request limit
Code:
// ==UserScript==
// @name Open Destination URL on unshorten.it
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Open Destination URL on unshorten.it
// @author You
// @match https://unshorten.it/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to check if element is present and execute replacement logic
function checkAndLoad() {
// Select the destination URL paragraph
var destinationUrlElement = document.querySelector('#destination-url p.data');
if (destinationUrlElement) {
console.log("Found destination URL element");
// Extract the destination URL from the paragraph text content
var destinationUrl = destinationUrlElement.textContent.trim();
console.log("Destination URL:", destinationUrl);
// Check if it's a valid URL with protocol (http or https)
if (/^https?:\/\//i.test(destinationUrl)) {
console.log("Valid protocol found in destination URL:", destinationUrl);
// Load this destination URL in same window's address bar
window.location.href = destinationUrl;
console.log("Redirecting to valid protocol-based destination URL:", destinationUrl);
// Remove interval since we've found and processed elements
clearInterval(interval);
} else {
console.log("Invalid protocol found in destination URL:", destinationUrl);
}
}
}
// Check every second for presence of required elements
var interval = setInterval(checkAndLoad, 1000);
})();
edit 2: wasn't able to create a redirector rule for the second service
made another bookmarklet for a huggingface.co repo.. started off with llama 3.1 sonar large 129K chat but the final code couldn't generate commands for inks found in folders.. gave it to sonnet 3.5 to fix and it did so on the first try. i use this instead of git on really large repos for better resume support.
Here's a layman's explanation of what this code does when run on a Hugging Face repository:
1. Link Finding:
The code searches the webpage for links to files and folders in the Hugging Face repository.
2. Folder Exploration:
When it finds a folder, it looks inside that folder for more files and subfolders.
3. Comprehensive Search:
It keeps searching through all folders and subfolders until it has found all the downloadable files.
4. List Creation:
As it finds files, it adds them to a list.
5. Command Writing:
Once it has all the files, it writes download commands for two programs: wget and aria2c.
a
6. URL Cleaning:
It removes unnecessary parts from the file URLs to make the download process smoother.
7. Folder Structure Preservation:
The commands it creates will download files into the same folder structure as on the website.
8. Clipboard Copy:
After creating all the commands, it copies them to your computer's clipboard.
9. User Notification:
It tells you when it's done and if there were any problems.
In summary, this code automates the process of finding all downloadable files in a Hugging Face repository, including those in subfolders, and creates easy-to-use download commands for you.
```
Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/.gitattributes?download=true
VM1492:10 Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/LICENSE.md?download=true
VM1492:10 Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/README.md?download=true
VM1492:10 Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/ae.sft?download=true
VM1492:10 Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/dev_grid.jpg?download=true
VM1492:10 Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.sft?download=true
VM1492:10 Found direct download link: /black-forest-labs/FLUX.1-dev/resolve/main/model_index.json?download=true
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/scheduler
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/text_encoder
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/text_encoder_2
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/tokenizer
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/tokenizer_2
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/transformer
VM1492:21 Fetching folder links from: /black-forest-labs/FLUX.1-dev/tree/main/vae
undefined
VM1492:34 Received HTML for: /black-forest-labs/FLUX.1-dev/tree/main/tokenizer
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/tokenizer/merges.txt?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/tokenizer/special_tokens_map.json?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/tokenizer/tokenizer_config.json?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/tokenizer/vocab.json?download=true
VM1492:34 Received HTML for: /black-forest-labs/FLUX.1-dev/tree/main/text_encoder
VM1492:34 Received HTML for: /black-forest-labs/FLUX.1-dev/tree/main/transformer
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/transformer/config.json?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/transformer/diffusion_pytorch_model-00001-of-00003.safetensors?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/transformer/diffusion_pytorch_model-00002-of-00003.safetensors?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/transformer/diffusion_pytorch_model-00003-of-00003.safetensors?download=true
VM1492:43 Found direct download link in folder: /black-forest-labs/FLUX.1-dev/resolve/main/transformer/diffusion_pytorch_model.safetensors.index.json?download=true
after you open the smiley menu, you have to click inside the form field to get the blinking cursor than click on the smiley to insert.
you can add your own preferred urls to the userscript too using the same url format thats easy to follow .. use chatgpt/LLM if you want to add multiple smilie urls and format it the way as seen in the userscript.
A.I generated:
Summary
Smiley Collection:
The script gathers a list of URLs for various smiley images.
Container Creation:
It creates a container (a div element) where these smiley images will be displayed.
This container is initially hidden and can be toggled on and off using a "Show/hide Smilies" button.
Display Settings:
The container is set to display at least three rows of smileys by default.
It is also made scrollable if there are more than three rows of smileys.
Lazy Loading:
Instead of loading all the smiley images immediately, they are loaded only when the container becomes visible.
Initially, placeholder images are used.
When you click the "Show/hide Smilies" button to show the container, the actual smiley images are loaded.
Insertion Functionality:
When you click on a smiley image, it inserts that image into the editable text area where you are typing.
Toggle Button:
The "Show/hide Smilies" button allows you to show or hide the smiley container.
When you click this button to show the container, it loads the actual smiley images.
Integration:
The script inserts the toggle button and the smiley container above or below the first editable field on the page, ensuring it does not interfere with the content editable area.
Key Points
Lazy Loading: Smiley images are loaded only when needed (when you show the container), improving performance.
Rows and Scrollability: The container maintains its initial height and allows scrolling if there are many smileys.
Toggle Button: Easily show or hide the smiley container using a button.
Insertion: Clicking on a smiley image inserts it into your editable text area.
This setup enhances user experience by providing an easy way to insert various smileys while optimizing performance through lazy loading.
edit:
YIKES! I didn't do a thorough enough bug test. I think it's looks to insert the show/hide button under the first input field it finds.
generated another userscript for use on the coli to basically replace .mp4 , .webm and m3u8 video links and embed a html5 video player that plays those links. the @match coul be modified to support any other site too.
Use Meta AI assistant to get things done, create AI-generated images for free, and get answers to any of your questions. Meta AI is built on Meta's latest Llama large language model and uses Emu, our...
meta.ai
to improve the video fitting into the screen,before some video dimension made it so that you needed to scroll the video.
Probably one of the few groups of posters that will notice, but the website is now inserting trackers into outgoing links in a way that isn't noticeable when hovering on a link. Case in point I made this post with a CNN article:
Yet has the complete thread URL inserted into it when clicked on it:
Someone suddenly tracking engagement on which threads get the most outgoing websites visits during political season seems questionable... The conspiracy theorist in me is wondering whether that's why there's so much pro-Trump/anti-Kamala content in TLR
LiveJournal has done something stupid again. Let me rephrase that: LiveJournal has done something REALLY fukking stupid. Links to about 150 e-commerce sites that users post to their LiveJournals are being redirected through a 3rd party website. These redirected links also open in a new window.ā¦
We wrote about 180Solutions back in March when the company stunned most people by raising $40 million. The issue wasnāt so much that the company had raised so much money, but that their invesā¦
www.techdirt.com
Inserting JavaScript into clean links means I literally can't verify any outgoing links across the entire website. The intrusive pop ups were never an issue for me due to ad blockers, but now it's veering into privacy territory imo.
Even all the links in this post have trackers in them smh. I tried right clicking and pasting in a new tab, as well as using the clearURLs extension but neither work. @bnew let me know if you know anything that strips this bullsh1t or if I should start winding down and looking for greener pastures.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.