The Official Power User Tips, Tricks & Productivity Thread

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
In simple terms, this userscript enhances Techmeme.com by adding extra links next to any Twitter or X.com URLs it finds on the page. Here's what it does:
  1. Finds Twitter/X Links: It looks for any links pointing to twitter.com or x.com (like tweets or profiles) on Techmeme.com pages.
  2. Adds Mirror Links: After each Twitter/X link, it adds small, clickable links to alternative websites ("mirrors") that show the same Twitter/X content. These mirrors are:
    • Nitter (nitter.poast.org)
    • Twiiit (twiiit.com)
    • Xcancel (xcancel.com)
    • Lightbrd (lightbrd.com)
  3. Keeps It Subtle: The extra links appear right after the original link in a tiny, gray font (e.g., [Nitter · Twiiit · Xcancel · Lightbrd]), so they don’t clutter the page or distract from Techmeme’s normal look.
  4. Works Automatically: It runs in the background, adding these mirror links as you load the page or expand sections (like "More" or "X:" lists), without you needing to do anything.

Why It’s Useful:​

These mirror sites let you view Twitter/X content in different ways—some might load faster, avoid logins, or show the content differently. The script gives you quick options without changing how Techmeme itself works.
For example, if Techmeme shows a tweet link like @bradlightcap, you’ll see the mirror links right after it, letting you pick an alternative way to view that tweet if you want. It’s all about convenience, done quietly and efficiently!


pastebin.com/vaua5FJX
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
Extract and Organize Embedded and Hyperlinked Media with Ease on XenForo Forums
This powerful JavaScript bookmarklet is designed specifically for XenForo forums, allowing users to extract and consolidate media and link content embedded within posts. Whether you're managing a forum or browsing one, this tool simplifies the process of retrieving URLs for review or sharing. Here's what it does:

Key Features:​

  1. Extract Embedded Media:
    • Automatically identifies and extracts relevant iframe media URLs, including:
      • Reddit content (converted to old.reddit.com format for compatibility).
      • sendvid.com videos.
      • streamable.com videos.
  2. Analyze Hyperlinks:
    • Collect <a> tag URLs linking to specific media platforms:
      • Albums on erome.com/a/.
      • Content on "bunkr" domains.
  3. Consolidates and De-duplicates:
    • Combines all extracted URLs into one list, removing duplicates to ensure clean results.
  4. Multi-format Display:
    • Multi-line View: Displays each URL on a separate line, making the list easy to review or copy.
    • Single-line View: Outputs URLs as a single line, separated by spaces, ideal for compact sharing.
  5. Clipboard Integration:
    • Two dedicated buttons allow users to copy either the multi-line or single-line output to their clipboard with a single click.
  6. Unobtrusive Design:
    • The interface appears as a clean, fixed-position pop-up on the page, which can be closed manually, ensuring it doesn't interfere with browsing.

Ideal Use Cases:​

  • Forum Moderators: Quickly retrieve and analyze media and links shared by users for moderation or content curation.
  • Content Researchers: Consolidate media and links embedded in threads and posts for research and analysis.
  • Community Members: Efficiently gather references and media from a forum discussion for sharing or bookmarking.

Compatibility:​

This tool is perfectly tailored for XenForo forums and works seamlessly within posts containing embeddable media or hyperlinks, providing a robust solution for media and link harvesting.
Elevate your XenForo forum experience with this efficient and user-friendly bookmarklet, designed for optimized content extraction and management. A must-have for moderators, researchers, and power users!

edit:
added instagram url extraction


pastebin.com/5bFh2A8q


pastebin.com/zFr8vxRZ

====

added domain filter button.

pastebin.com/DHMAZtLm

====
v1.5

pastebin.com/deR9f10R
 
Last edited:

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
an update to some previous code , it now shows full instagram , sendvid and reddit urls.



Basic Overview​

The bookmarklet, which I’ll call "XenForo DynamicImageCollector v1.3" for clarity, is a tool you run on a XenForo forum page (or any webpage) by clicking it in your browser’s bookmarks. It creates a floating panel that collects and displays images and specific URLs (like links to media embeds) from the page. You can interact with it to filter, copy, or scroll to content, making it easier to manage and save media you find in forum threads.

What It Does on a XenForo Forum​

On a XenForo-compatible forum (like thecoli.com or similar platforms), this bookmarklet:
  1. Finds Images: It grabs all the images (e.g., JPGs, PNGs, GIFs) from posts, but skips unwanted ones like avatars or smilies.
  2. Extracts Special URLs: It pulls out links to embeds (e.g., Instagram, Reddit, Streamable) from iframe tags and certain <a> links in posts.
  3. Shows a Panel: Displays a movable, resizable box with thumbnails of the images and tools to work with them.
  4. Lets You Filter: You can switch between showing all images, just GIFs, or embedded media (like Twitter or Instagram pics).
  5. Copies URLs: Provides buttons to copy image URLs or embed links in different formats (multi-line or single-line).
  6. Scrolls to Images: When checked, clicking a thumbnail jumps you to that image on the page.
  7. Manages Changes: You can delete thumbnails and undo/redo those changes.

Detailed Summary in Simple Terms​

Here’s an extensive breakdown of what "XenForo DynamicImageCollector v1.3" does on a XenForo forum, explained step-by-step in plain language:

1. Starting the Tool​

  • You click the bookmarklet in your browser while on a XenForo forum thread.
  • A white box (panel) pops up on the right side of the screen. You can drag it around or resize it by pulling the blue corner.

2. Collecting Images​

  • The tool scans the page for all <img> tags (pictures in posts).
  • It cleans up the image URLs by:
    • Removing extra stuff like ? or :large (e.g., turns https://pbs.twimg.com/media/Fg5dUuNUcAAvmg8.jpg:large into https://pbs.twimg.com/media/Fg5dUuNUcAAvmg8.jpg).
    • Fixing Reddit preview links (e.g., preview.redd.it becomes i.redd.it).
    • Skipping junk like avatars (e.g., https://www.thecoli.com/data/avatars/...), smilies (e.g., https://www.thecoli.com/styles/...), or tiny icons.
  • Only keeps images ending in .gif, .jpg, .jpeg, .png, or .webp unless you’re in "embeds" mode.

3. Collecting Special Links​

  • It also looks for special URLs in the thread:
    • Iframe Embeds: Finds hidden iframe tags (common in XenForo for media embeds) and extracts URLs like:
      • Reddit posts (e.g., https://old.reddit.com/r/subreddit/comments/id).
      • Sendvid videos (e.g., https://sendvid.com/id).
      • Streamable videos (e.g., https://streamable.com/id).
      • Instagram posts (e.g., https://www.instagram.com/p/id/).
    • Anchor Links: Grabs <a> tags with links to:
      • Erome albums (e.g., https://erome.com/a/id).
      • Bunkr files (e.g., https://bunkr.is/...).
      • Instagram pages.
  • These URLs are stored separately from images and shown only when you choose "Show Domains."

4. Displaying the Panel​

  • The panel shows:
    • Top Bar:
      • A checkbox for "Scroll to image" (checked by default—clicking thumbnails jumps to the image on the page).
      • A "Preserve state" checkbox (locks your current filtered list so it doesn’t reset).
      • A count (e.g., "5 Images / 3 URLs Found").
      • Buttons: "Show GIFs Only," "Show Embeds Only," "Show Domains," and a close "×" button.
      • A "Drag Here" spot to move the panel.
    • Buttons Below:
      • "Copy All URLs" (copies what’s in the text box).
      • "↩️ Undo" and "↪️ Redo" (undo/redo deleting thumbnails).
    • Thumbnails: Small previews of the collected images, each with a red "×" to delete it.
    • Text Box: A multi-line list of URLs (starts with image URLs).
    • Single Line Field: A single-line version of the URLs.
    • Copy Buttons: "Copy Single Line URLs" and "Copy All Combined URLs" (grabs everything—images and embeds).

5. Interacting with Images​

  • Thumbnails:
    • Click an image (with "Scroll to image" checked), and the page scrolls to the top of that image in the thread, with a blue outline flashing for 2 seconds.
    • Click the red "×" to remove a thumbnail from the list (you can undo this).
  • Filtering:
    • "Show GIFs Only": Cycles to show only GIFs, then non-GIFs, then all images.
    • "Show Embeds Only": Shows only embedded media (e.g., Twitter or Instagram images).
    • Updates the thumbnails and text fields to match what’s shown.

6. Interacting with URLs​

  • Show Domains:
    • Hides thumbnails and shows buttons for each domain (e.g., reddit.com, instagram.com).
    • Click a domain to see only URLs from that site in the text fields.
    • Go back to images with "Show Images."
  • Copying:
    • "Copy All URLs": Copies the multi-line text box (images or domain URLs, depending on view).
    • "Copy Single Line URLs": Copies the single-line field.
    • "Copy All Combined URLs": Copies a unique list of all images and embed URLs together.

7. Managing Changes​

  • Delete: Removing a thumbnail updates the count and fields, saving the old state so you can undo.
  • Undo/Redo:
    • "Undo" brings back the last deleted thumbnail.
    • "Redo" reapplies the deletion.
  • Preserve State: Checking this locks your current filtered list (e.g., only GIFs) so it doesn’t reset when switching filters.

8. Extra Features​

  • Toast Messages: Little pop-ups at the bottom tell you what’s happening (e.g., "Image removed," "URLs copied").
  • Persistent Scroll Setting: Your "Scroll to image" choice saves across uses via localStorage.

Example on a XenForo Forum​

Imagine you’re on a thread at thecoli.com with:
  • A post with image.jpg and smile.png.
  • An Instagram embed (https://www.instagram.com/p/abc123/).
  • A link to https://erome.com/a/xyz789.
What Happens:
  • The panel opens, showing image.jpg as a thumbnail (skips smile.png because it’s in /styles/).
  • The text fields show image.jpg initially.
  • Click "Show Domains," and you see buttons for instagram.com and erome.com. Click one, and the fields show https://www.instagram.com/p/abc123/ or https://erome.com/a/xyz789.
  • Check "Scroll to image," click the image.jpg thumbnail, and the page scrolls to that image in the thread.

Why It’s Useful​

  • Saves Time: Quickly grab all media without manually copying links.
  • Organizes: Separates images from embeds and lets you filter by type or domain.
  • Interactive: Scroll to images or tweak the list without refreshing the page.
This tool is tailored for XenForo forums but works on any site, adapting to its content. Let me know if you need more details or tweaks!



pastebin.com/wyNVT3uX
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
A bookmarklet script that ensures all YouTube spans are captured. It adds an extra field at the bottom to display the extracted URLs in a single line, separated by spaces, along with a dedicated button to copy them.


Key Features:

  1. Multi-line URLs Field:
    • Displays the extracted YouTube URLs, each on a new line, in a textarea for easy readability.
    • Includes a button to copy all URLs from this field.
  2. Single-line URLs Field:
    • Displays URLs concatenated into a single line separated by spaces in a text input.
    • Includes a separate button to copy all URLs from this field.
  3. Close Button:
    • Closes the widget after viewing or copying the URLs.
  4. Improved URL Extraction:
    • Extracts all YouTube video IDs from span[data-s9e-mediaembed-iframe] elements reliably using regex and constructs full [MEDIA=youtube]VIDEO_ID[/MEDIA] links.

How It Works:

  • The script scans for span elements with the attribute data-s9e-mediaembed-iframe.
  • It parses the iframe data to identify YouTube embeds (youtube.com/embed/) and extracts the video IDs using a regex pattern.
  • The extracted IDs are converted into standard YouTube URLs (watch format).
  • The URLs are presented in two formats:
    • Multi-line (textarea).
    • Single-line (input box).
  • Buttons are provided for copying either format to the clipboard.

This implementation ensures flexibility and ease of use for handling YouTube links embedded in this specific way.

OUYfwrM.png



pastebin.com/0UEUT2hi
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
An update of "tiktok to xenforo bbcode" bookmarklet based on the provided HTML DOM structure, ensuring the JavaScript selectors align with the page's actual HTML attributes and class names. Below is the updated bookmarklet with the revised selectors and additional fixes:

Updated Bookmarklet


javascript

pastebin.com/RPUVB3RD

Changes and Improvements

  1. Selectors Updated:
    • Adjusted to match the DOM structure provided, such as:
      • Title: .css-6yud38-DivDescriptionContentContainer + span.css-j2a19r-SpanText.
      • Creator info: .css-1k4xbc2-DivCreatorInfoContainer.
      • Engagement metrics (data-e2e attributes for counts remain unchanged).
  2. Dynamic Content Compatibility:
    • Ensures fallback mechanisms with null checks for missing elements.
  3. Element Anchoring:
    • Anchored the "Copy TikTok Data" button to .css-1dqhyfg-DivMediaCardOverlayTop for better reliability in dynamic TikTok pages.
  4. Testing for TikTok Domain:
    • Added a check to ensure the script runs only on TikTok video pages.
  5. Error Handling:
    • Improved feedback messages for debugging purposes.

How to Use:​

  1. Save the bookmarklet script in your browser's bookmarks bar.
  2. Navigate to a TikTok video page.
  3. Click the bookmarklet. If successful, it will add a button ("Copy TikTok Data") to the page.
  4. Click the button to copy the video metadata in XenForo BBCode format to your clipboard.
This updated bookmarklet ensures compatibility with the latest TikTok DOM structure for scraping metadata systematically.

edit:
added a userscript


pastebin.com/vePzUvpy
 
Last edited:

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
the archive site broke a autorun parameter on the site so i used an LLM to get around the issue.



pastebin.com/0JhLV8AW

Simple Description of the Script's Function​

This userscript automatically presses the "save" button on archive.is for you—
but only if:

  • The webpage's address contains run=1
  • The URL input box on the page already has a link filled in
If these conditions are met, you don’t need to click anything. The script does it for you as soon as the page loads.

Summary:
It saves you time by auto-submitting the archive form when those two conditions are satisfied, making archiving links on archive.is faster and easier.
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825

Simple Explanation​

This userscript adds a "Vertical View" button to old Reddit image galleries. When you click it:
  • All gallery images are shown in a single vertical column (full size, no clicking next/previous needed).
  • Quick links let you jump to any image instantly.
  • There's a button to go back to the original thumbnail grid view.
In short:
It lets you see all images at once, scroll or jump between them easily, and switch back to the normal grid anytime.
Established fact:
  • It does not change anything on non-gallery or modern Reddit pages.
  • Only adds a button and the vertical image view; no popups or overlays.
  • Works in Chrome/Firefox with Tampermonkey or Violentmonkey.

Rationale:
  • Users of old Reddit often want to view all gallery images at once for easier comparison or instant access; default Reddit UI requires excessive clicking/scrolling.
  • Vertical viewing is familiar, keyboard/mouse friendly, and works on both desktop and mobile browsers.
  • Jump controls allow accessibility and convenience, especially for large galleries.
  • "Back to Grid View" ensures the script is easily reversible—no permanent state, minimal surprise.
  • The design avoids interfering with Reddit’s core scripts, event handlers, or navigation.

Action Items​

  • Install the script in Tampermonkey/Violentmonkey, then reload any old Reddit gallery post.
  • Click the "Vertical View" button. All images will appear vertically; use jump links or "Back to Grid View" to restore the original interface.
  • If you encounter new gallery structures or compatibility issues, report the specific HTML so selectors can be updated or generalized.



pastebin.com/YvNZf2dL
 
Last edited:

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,164
Reputation
9,642
Daps
172,825
watch youtube videos on the coli wthout messing up your algorithm. this script replaces youtube embeds with a embed from a invidious instance. the embed uses less ram/memory too.

The userscript, when installed in a userscript manager like Tampermonkey on a XenForo-compatible forum, automatically finds any YouTube video embeds or YouTube links in forum threads and replaces them with privacy-friendly Invidious embeds and links.

What does the userscript do, step by step?​

  • Detection:
    The script scans each forum page (or any newly-added content) for:
    • Embedded YouTube videos (in <span> or <iframe> elements)
    • Direct YouTube links (youtube.com/watch... or youtu.be/...)
  • Video ID Extraction:
    It extracts each YouTube video’s unique ID from the embed/link URL using pattern matching.
  • Invidious Replacement & Embedding:
    For each found video, it:
    • Removes the original YouTube embed or link from the post.
    • Inserts an Invidious embed in its place—a privacy-friendly alternative player that does not track users.
    • Embeds are fully responsive and styled to fit the forum layout.
  • Title Fetching:
    The script attempts to fetch the video's title from the Invidious API. If it can, the video title is displayed above the player. If the title can't be fetched, it simply skips showing the title without any errors or ugly gaps.
  • YouTube Link Display:
    Under each Invidious video, it adds an underlined link to the original YouTube page for that video. Users can always access the actual YouTube page if they wish.
  • Prevents duplicate embeds:
    The script marks each processed element so it only replaces each video once—even if the forum dynamically loads or changes content (like when new posts load without refreshing the whole page).
  • Handles Dynamically Loaded Content:
    On XenForo forums, new content (like when you scroll or new replies are loaded) can be added without reloading the whole page. The script watches for these updates and will replace any new YouTube embeds or links as they appear.
  • Graceful & Non-Intrusive:
    • The change to Invidious is seamless; users just see the new player, not the underlying technical swap.
    • If anything fails (for example, if the Invidious API is slow or the title fetch breaks), the video still embeds and displays the YouTube link—users do not see any errors.

Simple, real-world summary:​

  • You paste a YouTube link or video in a XenForo forum post.
  • Instead of loading the video from YouTube directly, the forum—on your browser—automatically swaps it for a privacy-respecting Invidious embed.
  • You see a familiar video player, optionally a video title, and always a link to the original YouTube video underneath.
  • It works everywhere in forum threads, including new posts and edits, and doesn't break if the forum loads new posts dynamically.
  • You do not have to take any extra steps after installing the userscript; it runs automatically whenever you browse forum threads.
Why is this useful?
  • Prevents YouTube from tracking you while browsing and watching forum-embedded videos.
  • Bypasses region or age restrictions and provides a cleaner, faster player.
  • Keeps a direct link to YouTube in case you want to watch or interact there.
In short:
The script transparently replaces all embedded or linked YouTube videos on XenForo forums with Invidious players, enhancing privacy and user control, while keeping the YouTube link handy underneath each embed.135


pastebin.com/DYza17gK
old code
4/26/2025

pastebin.com/3mqkCcvW
 
Top