Giter Club home page Giter Club logo

x-show-all's Introduction

๐• Show All

This is a bookmarklet for ๐• (Twitter) that will automatically click the "Show" button on sensitive content.

You were going to click it anyway. Let this bookmarklet do it for you!

Language Support

The bookmarklet currently supports English and Japanese. If you'd like it to support your language let me know what "Show" appears as in your language.

Setup

  1. Create a new bookmark.
  2. The bookmark name can be anything you want.
  3. Copy paste this minified javascript and use it as the bookmark URL.
  4. Save your new bookmark.
javascript:(()=>{if(!["twitter.com","x.com"].includes(window.location.hostname))return;const t=["Show","่กจ็คบ"],e=setInterval((()=>document.querySelectorAll('div[role="button"]').forEach((e=>{t.some((t=>t===e.textContent.trim()))&&e.click()}))),1e3);setTimeout((()=>clearInterval(e)),6e5)})();

Usage

  1. Click your new bookmark when you see content hidden behind the "Show" button.
  2. Watch everything magically reveal itself!

The bookmarklet will continue working for 10 minutes before automatically stopping. It will also stop if you navigate away from ๐• or reload the site.

Simply click the bookmark again if needed.

Troubleshooting

In Microsoft Edge, activating the bookmarklet from the favorites dropdown menu may not work. You will need to activate it from the favorites bar, which can be toggled with Ctrl+Shift+B.

Code

This is the unminified javascript code. It should work on all major modern browsers.

javascript:(() => {
  const targetHosts = ['twitter.com', 'x.com'];
  if (!targetHosts.includes(window.location.hostname)) {
    return;
  }
  const showText = ['Show', '่กจ็คบ'];
  const showAll = () => document.querySelectorAll('div[role="button"]').forEach(button => {
    if (showText.some(str => str === button.textContent.trim())) button.click();
  });
  const timeoutDelay = 600000;  // 600,000 ms = 10 min
  const intervalDelay = 1000;   // 1,000 ms = 1 sec
  const intervalId = setInterval(showAll, intervalDelay);
  setTimeout(() => clearInterval(intervalId), timeoutDelay);
})();

Support

Please like and share this with anyone that might find it useful.

You can also follow me on ๐• @ NeonNoodle22.

I appreciate it!

x-show-all's People

Contributors

chingc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.