* this was created with AI / LLM DeepSeek coder 2 and llama3-70B-instruct
posting this here because I just realized the other scripts i posted are only accessible to registered members and there are thousands of people who visit the site who wouldn't have access to it otherwise.
This userscript is designed to enhance the functionality of thecoli.com. It performs several tasks:
1. **Embedding Social Media Posts**: It embeds posts from various social media platforms such as X (formerly Twitter), Threads.net, Mastodon, and Bluesky directly into the forum posts. This is done by detecting URLs from these platforms in forum posts and replacing them with embedded iframes that display the content directly.
2. **Add Twitter/X mirror **: The script adds links to a Twitter a twitter mirror called Twstalker. This comes in handy if you don't have an account to view content marked sensitive. so if you ever see an embed thatdoesn't load, don't always assume the content, click the twstalker link to see if it's still up.
3. **URL Replacement and Enhancement**: The script also handles the replacement of certain URLs with more user-friendly versions. For example, it replaces `x.com` URLs with `twitter.com` URLs and enhances image URLs from certain domains to point to more direct links.
4. **Dynamic Content Handling**: Fix links to Twitter images (twimg.com) so they display correctly.
Fix links to Reddit images so they display correctly.
**Layman's Terms Summary**: This script makes forum posts on certain websites more interactive by showing social media posts directly within the forum instead of as links. It also makes sure that the display of these posts adjusts automatically to fit the content, and it improves how links and images are displayed to make them easier to view.
userscript in action:
X.com link turned into an embed
The most popular userscript managers are Greasemonkey, Tampermonkey, and Violentmonkey.
Install Tampermonkey
adds mirror invidious links for youtube embeds, added extra archive.is save link for xcancel.com Nitter instance.
I had to update the script since it was converting
edited line 18:
copy this link
click install
don't forget to enable tampermonkey or any userscript manager extension to work in incognito/private mode
You can use the Firefox browser or Fennec browser on android or any firefox browser fork with the extension tampermonkey.
Kiwi Browser for Android support userscripts through extensions like Tampermonkey or Violentmonkey.
there are other mobile browsers that support userscripts natively.
heres how to install on iOS.
Brave browser and Chrome browser on mobile do not support userscripts or extensions.
**Important Notice Regarding Threads.net Embeds and Rate Limiting**
Users of the "X, Threads.net and Mastodon Embed and more" user script should be aware of potential limitations when attempting to embed content from Threads.net into forums on sites like `Sports, Hip Hop & Piff - The Coli`. META, the platform that hosts Threads.net, employs aggressive rate limiting to manage server load and ensure a fair distribution of resources. While the script includes throttling mechanisms to manage the frequency of requests, these may not be sufficient to prevent triggering META's rate limiting thresholds.
To help mitigate the risk of being rate-limited by META, users can adjust the throttling settings within the script to make fewer requests to Threads.net. Here's how you can modify the throttling settings specifically for the `adjustIframeHeights` function:
1. **Locate the Throttling Configuration**: Open the userscript file in a text editor or tampermonkey. Scroll down to the section where the `adjustIframeHeights` function is defined. You will find the following lines of code:
2. **Adjust the Throttle Limit**: The `throttle` function is used to limit the frequency of the `adjustIframeHeights` function. The second parameter, `25000`, specifies the delay in milliseconds before the function can be called again. To reduce the number of requests, increase this delay. For example, you might change `25000` to `50000` to allow the function to run at most once every 50 seconds.
3. **Modify the Interval Time**: The `setInterval` function is used to periodically call the `throttledAdjustIframeHeights` function. The second parameter, `65000`, specifies the interval in milliseconds between each call. To further reduce the frequency of requests, increase this interval. For instance, you could change `65000` to `120000` to check for height adjustments every 2 minutes.
4. **Apply the Changes**: After modifying the throttling and interval settings, save the changes to the script file. Reload the webpage to apply the new settings and observe if the rate limiting issues have been resolved or improved.
5. **Monitor Performance**: Keep an eye on the script's performance and the console for any error messages. If you continue to encounter rate limiting issues, you may need to further increase the throttling settings or consider other strategies to reduce the load on Threads.net's servers.
Please note that adjusting the throttling settings may affect the responsiveness and functionality of threads.net embeds. It is important to find a balance that allows for smooth operation without overwhelming the server.[/size][/spoiler][/spoiler]
posting this here because I just realized the other scripts i posted are only accessible to registered members and there are thousands of people who visit the site who wouldn't have access to it otherwise.
Whats a Userscript?
A userscript is a small computer program that is designed to customize the way web pages are displayed or function in a web browser. Userscripts are typically written in JavaScript and can be used to modify the appearance, behavior, or functionality of websites. Users can install userscripts in their web browsers using add-ons or extensions such as Greasemonkey or Tampermonkey. This allows users to personalize their browsing experience and add new features to websites.what does this userscript do?
This userscript is designed to enhance the functionality of thecoli.com. It performs several tasks:
1. **Embedding Social Media Posts**: It embeds posts from various social media platforms such as X (formerly Twitter), Threads.net, Mastodon, and Bluesky directly into the forum posts. This is done by detecting URLs from these platforms in forum posts and replacing them with embedded iframes that display the content directly.
2. **Add Twitter/X mirror **: The script adds links to a Twitter a twitter mirror called Twstalker. This comes in handy if you don't have an account to view content marked sensitive. so if you ever see an embed thatdoesn't load, don't always assume the content, click the twstalker link to see if it's still up.
3. **URL Replacement and Enhancement**: The script also handles the replacement of certain URLs with more user-friendly versions. For example, it replaces `x.com` URLs with `twitter.com` URLs and enhances image URLs from certain domains to point to more direct links.
4. **Dynamic Content Handling**: Fix links to Twitter images (twimg.com) so they display correctly.
Fix links to Reddit images so they display correctly.
**Layman's Terms Summary**: This script makes forum posts on certain websites more interactive by showing social media posts directly within the forum instead of as links. It also makes sure that the display of these posts adjusts automatically to fit the content, and it improves how links and images are displayed to make them easier to view.
userscript in action:
X.com link turned into an embed
To use user scripts you need to first install a user script manager. Here are managers for various browsers:
*GM is short for GreaseMonkey- Greasemonkey - Firefox
- Supports GM 4 userscripts.
- Greasemonkey for Pale Moon - Pale Moon
- Supports GM 3 userscripts.
- Firemonkey - Firefox
- Supports GM 4 userscripts and some GM 3 userscripts.
- Tampermonkey - Chrome, Microsoft Edge, Safari, Opera, Firefox (also with support for mobile Dolphin Browser and UC Browser)
- Supports both GM 3 and GM 4 userscripts.
- USI - Firefox
- Supports some GM 3 userscripts.
- Violentmonkey - Chrome, Firefox, Maxthon, Opera
- Supports both GM 3 and GM 4 userscripts.
The most popular userscript managers are Greasemonkey, Tampermonkey, and Violentmonkey.
Install Tampermonkey
The Userscript:
adds mirror invidious links for youtube embeds, added extra archive.is save link for xcancel.com Nitter instance.
bug fix for bluesky embeds that didn't adjust height of content properly. added mirror links under twitter/X embed.
old version 9/9/24
fixed bluesky / bsky post embeds,
old version 6/25/24
old version 9/9/24
fixed bluesky / bsky post embeds,
old version 6/25/24
I had to update the script since it was converting
[URL unfurl="true"]https://www.tiktok.com/t/ZPRERxvTg/[/URL]
into mastodon embeds that wouldn't load because it wasn't design for that.edited line 18:
const mastodonRegex = /^https?:\/\/(?!www\.tiktok\.com)([a-z\d-_]+\.)*([a-z\d-_]+)\.([a-z]{2,})(\/@[a-zA-Z0-9-_]+(@[a-zA-Z0-9-_]+)?\/\d+|\/@[a-zA-Z0-9-_]+\/post\/\w+|\/t\/\w+)/;
Userscript Beginners HOWTO
The home of FOSS user scripts. Contribute to OpenUserJS/OpenUserJS.org development by creating an account on GitHub.
github.com
copy this link
https://pastebin.com
/raw/Q8KEDLZf
( remove the space between / and /raw/) and paste it into the Import from URL field in tampermonkey -> Utilities tab click install
don't forget to enable tampermonkey or any userscript manager extension to work in incognito/private mode
You can use the Firefox browser or Fennec browser on android or any firefox browser fork with the extension tampermonkey.
Kiwi Browser for Android support userscripts through extensions like Tampermonkey or Violentmonkey.
Kiwi Browser - Fast & Quiet - Apps on Google Play
Kiwi Browser is a fast browser for Android with extensions support
play.google.com
there are other mobile browsers that support userscripts natively.
heres how to install on iOS.
Tampermonkey for Chromium
The home of FOSS user scripts. Contribute to OpenUserJS/OpenUserJS.org development by creating an account on GitHub.
github.com
Scott Santens (@scottsantens.com)
Individuals who received the $1,000/mo or $500/mo payments were more likely to find a stable, full-time job than before they received the basic income. Results showed 45% of participants secured housing, while $589,214 was saved in public service costs. "It's freedom. It's freedom from...
bsky.app
Chris Morran (@themorrancave.bsky.social)
Under all the math and engineering involved in this "advanced" plastic recycling process, my colleague @lisalsong.bsky.social found an inconvenient truth: Not much is being recycled at all, nor is pyrolysis capable of curbing the plastic crisis. Not now. Maybe not ever...
bsky.app
Nick Page (@nickpagephotography) on Threads
Catching flies… crazy that my 500mm f4 from 1999 is still able to focus fast enough to track these little jet fighters… With a teleconverter on! Got lucky this morning!
www.threads.net
Djalma Barbosa de Menezes (@pebmx30) on Threads
@xgames / ❌GAMES CALIFORNIA 2023 BMX DIRT BEST TRICK 🔥 • 🥉@davidgodziek • #Xgames #XGamesCalifornia2023 #bmxtricks #xgamesbmx #bmxpark #bmx #tricks #bike #eminentbmxtv • 🔁Repostado: by @pebmx30
www.threads.net
Ars Technica (@arstechnica@mastodon.social)
Attached: 1 image From Infocom to 80 Days: An oral history of text games and interactive fiction MUDs, Usenet, and open source all play a part in 50 years of IF history...
mastodon.social
ProPublica (@ProPublica@newsie.social)
The Delusion of “Advanced” Plastic #Recycling The #plastics industry has heralded a type of chemical recycling it claims could replace new shopping bags and candy wrappers with old ones — but not much is being recycled at all, and this method won’t curb the crisis. #News #Pyrolysis #Chemicals...
newsie.social
Brave browser and Chrome browser on mobile do not support userscripts or extensions.
**Important Notice Regarding Threads.net Embeds and Rate Limiting**
Users of the "X, Threads.net and Mastodon Embed and more" user script should be aware of potential limitations when attempting to embed content from Threads.net into forums on sites like `Sports, Hip Hop & Piff - The Coli`. META, the platform that hosts Threads.net, employs aggressive rate limiting to manage server load and ensure a fair distribution of resources. While the script includes throttling mechanisms to manage the frequency of requests, these may not be sufficient to prevent triggering META's rate limiting thresholds.
To help mitigate the risk of being rate-limited by META, users can adjust the throttling settings within the script to make fewer requests to Threads.net. Here's how you can modify the throttling settings specifically for the `adjustIframeHeights` function:
1. **Locate the Throttling Configuration**: Open the userscript file in a text editor or tampermonkey. Scroll down to the section where the `adjustIframeHeights` function is defined. You will find the following lines of code:
2. **Adjust the Throttle Limit**: The `throttle` function is used to limit the frequency of the `adjustIframeHeights` function. The second parameter, `25000`, specifies the delay in milliseconds before the function can be called again. To reduce the number of requests, increase this delay. For example, you might change `25000` to `50000` to allow the function to run at most once every 50 seconds.
3. **Modify the Interval Time**: The `setInterval` function is used to periodically call the `throttledAdjustIframeHeights` function. The second parameter, `65000`, specifies the interval in milliseconds between each call. To further reduce the frequency of requests, increase this interval. For instance, you could change `65000` to `120000` to check for height adjustments every 2 minutes.
4. **Apply the Changes**: After modifying the throttling and interval settings, save the changes to the script file. Reload the webpage to apply the new settings and observe if the rate limiting issues have been resolved or improved.
5. **Monitor Performance**: Keep an eye on the script's performance and the console for any error messages. If you continue to encounter rate limiting issues, you may need to further increase the throttling settings or consider other strategies to reduce the load on Threads.net's servers.
Please note that adjusting the throttling settings may affect the responsiveness and functionality of threads.net embeds. It is important to find a balance that allows for smooth operation without overwhelming the server.[/size][/spoiler][/spoiler]
Last edited: