The Official Power User Tips, Tricks & Productivity Thread

bnew

Veteran
Joined
Nov 1, 2015
Messages
68,705
Reputation
10,592
Daps
185,687
so i updated the Instagram embed reloader

the script will work for multiple media iframes/embeds:
  • iframe[data-s9e-mediaembed="abcnews"]
  • iframe[data-s9e-mediaembed="acast"]
  • ... and all the others in your list.


Summary of changes:
  • Expanded support to all the listed iframe providers by looping through SUPPORTED_IDS and building a selector for iframe[data-s9e-mediaembed="<id>"] for each.
  • All other logic remains unchanged, so the reload button handling is just as before.

You may now use this script for all of your listed iframe providers.



pastebin.com/mP8JTquP


The script will now:
  • Support per-site button position/color overrides.
  • Only wrap/add reload button for matching iframes, never touching their src except during a button click.
  • Work on dynamic content with a MutationObserver.
  • Use readable default button



pastebin.com/iiKb9nxx


eN2zgNC.png

it adds a reload button next to each iframe.
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
68,705
Reputation
10,592
Daps
185,687
not sure if the above userscript caused a memory leak with certan thread pages with different iframe configurations but just in case I refactored for memory improvements using deepseek non-reasoning.

Here's the complete updated userscript with memory optimizations:



pastebin.com/AMNQCi8T

## Key Changes Made:

1. **Optimized Selector**: Changed from complex 134-ID selector to simple `iframe[data-s9e-mediaembed]` with manual filtering
2. **Throttled Observer**: Added proper timeout management to prevent excessive scans
3. **Observer Cleanup**: Added disconnect logic for page navigation/unload
4. **Reduced Observer Scope**: Removed unnecessary attribute/characterData observation
5. **Memory Management**: Proper cleanup of timeouts and observers

## Verification Checklist:

1. ✅ All media embeds still get reload buttons
2. ✅ Per-site styling and positioning preserved
3. ✅ Reload functionality works on click only
4. ✅ Dynamic content detection still works
5. ✅ Memory usage should be significantly reduced
6. ✅ No breaking changes to existing functionality

The script maintains all original features while reducing memory consumption through optimized DOM queries and proper resource cleanup.
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
68,705
Reputation
10,592
Daps
185,687
for tikviewr.com . it didnt have a close button for the videos so i added one.

You can create a userscript with Tampermonkey or Greasemonkey that automatically inserts a custom "Close Video" button into the modal overlay. This button will call the same closing function (closeGridVideoModal()) used by the existing close button, ensuring seamless integration.
Here’s a complete userscript:



pastebin.com/HCn6i04i

What this script does in plain English​

This userscript works on the website tikviewr.com and automatically adds a big red "Close Video" button inside the video pop-up overlay. When you click the button, it tells the website to close the video player and return you to the normal page.
Behind the scenes, the script:
  • Watches for when a video player appears on the screen.
  • Adds a custom close button that’s easy to see and click.
  • Calls the site’s own built-in closing function so it behaves the same as the original "X" button.
  • If for some reason that function doesn’t exist, it hides the pop-up by changing its style.
So, in simple terms, it makes it much easier to exit out of TikTok videos when browsing anonymously on TikViewr without having to hunt for the small "X" close button.
Would you like me to also make the button appear outside the player (like a floating utility button always visible on screen), or should it stay inside the modal?

  1. https://tikviewr.com
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
68,705
Reputation
10,592
Daps
185,687
An update to the Content element copier code I shared before. It can now click on elements with links without redirecting the page.

Changelog​

  • Added: event.preventDefault() and event.stopPropagation() to prevent hyperlinks and other default browser behaviors from activating when selecting elements

Non-Technical Summary​

This bookmarklet creates a temporary tool that lets you click on any webpage element to copy its HTML code. When activated, it highlights selected elements in red, shows helpful messages at the bottom of the screen, and allows you to exit by pressing Q or Escape key. The recent fix prevents links from opening when you're trying to select them for copying.
javascript



pastebin.com/JuUMVEKc
 

Heimdall

Under His Eye
Joined
Dec 13, 2019
Messages
627
Reputation
393
Daps
1,413
panic-fire-pizza-delivery-donald-glover-community-hgtfloxfvpzc2i77.webp


Sticktock and ProxiTok seem to be dead fyi, but Offtiktok (also an option in LibRedirect) is working well
New TikTok redirect alert 🌠

Offtiktok has been fine for me but this looks okay. I'll try it in LibRedirect, hmm it needs a different kind of redirect


YouTube has been extra :trash: for me lately, it just keeps leaking :mad:

I've had to disable Tracking Protection and uBlock Origin, change the user agent to Chrome and try to minimise the tweaks in Untrap.

Also trying a different userscript now, though it pertains to CPU usage:
For the last couple of weeks I have been trying to address the trash performance on YouTube as well as the way my Firefox would just crash after a couple of weeks. Major changes:
- Switched primary YouTube addon to this instead of Untrap, which I think, was a major contributor :pachaha:
I am still using Mrfdev's Enhancer for YouTube for a couple of things even though it has been discontinued for Firefox :yeshrug:
- Also using fewer userscripts on YT
- Increased max pagefile size. It turns out my max was too low. I didn't think it would be needed as much with more RAM, but I have a script refreshing every minute and I have seen the pagefile size balloon up to 7GB (I previously had the max at 3.5, now at 8GB)
- The main Firefox and extension process still increase in memory usage over time, and Bitwarden is the biggest contributor and I really don't know why. I have tried disabling autofill on some sites
- Oh and I reduced browser.sessionhistory.max_total_viewers, browser.sessionhistory.max_entries, browser.sessionstore.max_serialize_back and dom.ipc.processCount.webIsolated to try to reduce the number of total processes (and memory usage, I hope?)
 
Last edited:

AStrangeName

Member of Snitch Syndication
Joined
Jan 18, 2016
Messages
11,636
Reputation
1,916
Daps
25,406
panic-fire-pizza-delivery-donald-glover-community-hgtfloxfvpzc2i77.webp



New TikTok redirect alert 🌠

Offtiktok has been fine for me but this looks okay. I'll try it in LibRedirect, hmm it needs a different kind of redirect



For the last couple of weeks I have been trying to address the trash performance on YouTube as well as the way my Firefox would just crash after a couple of weeks. Major changes:
- Switched primary YouTube addon to this instead of Untrap, which I think, was a major contributor :pachaha:
I am still using Mrfdev's Enhancer for YouTube for a couple of things even though it has been discontinued for Firefox :yeshrug:
- Also using fewer userscripts on YT
- Increased max pagefile size. It turns out my max was too low. I didn't think it would be needed as much with more RAM, but I have a script refreshing every minute and I have seen the pagefile size balloon up to 7GB (I previously had the max at 3.5, now at 8GB)
- The main Firefox and extension process still increase in memory usage over time, and Bitwarden is the biggest contributor and I really don't know why. I have tried disabling autofill on some sites
- Oh and I reduced browser.sessionhistory.max_total_viewers, browser.sessionhistory.max_entries, browser.sessionstore.max_serialize_back and dom.ipc.processCount.webIsolated to try to reduce the number of total processes (and memory usage, I hope?)
Use Tweaks for YouTube if you keep running into issues

These old layouts :to:
Look what they took away from us :mjcry:
 

Heimdall

Under His Eye
Joined
Dec 13, 2019
Messages
627
Reputation
393
Daps
1,413

I've been using this addon for a few weeks and it makes browsing so annoying, it's basically extinguished the desire to even lurk. :mjlol:
 

Heimdall

Under His Eye
Joined
Dec 13, 2019
Messages
627
Reputation
393
Daps
1,413

Ferdium​

I've been meaning to post about this one for a while.


tbh... it's not all that unlike having a separate browser with pinned tabs for various sites, or multiple PWAs installed but accessible in one window, but it has been very useful to have one completely separate program for multiple services (web apps, basically) - for both ones I use frequently, and ones I use rarely but would have otherwise have had to install something for.

I currently have TickTick, Keep, Calendar, Telegram, Discord, Udemy, ChatGPT/Gemini/Duck.ai set up, but there are plenty of existing ones to choose from, and I don't think it's difficult to add a custom one.

Plus a Gist with a few tips I found.


I think an Android equivalent would be Hermit: Hermit — Lite Apps Browser - Apps on Google Play
 
Top