IMDb - stop scripts

Prevent unnecessary scripts from loading

Per 28-08-2021. Zie de nieuwste versie.

Maker
Achernar
Beoordelingen
0 0 0
Versie
0.6.3
Gemaakt op
24-08-2021
Bijgewerkt op
28-08-2021
Grootte
2,79 KB
Licentie
N.v.t.
Wordt toegepast op

Every IMDb page loads more than 30 scripts (almost 50 on the new "title" page). (Note that these scripts are not the ones filtered by an ad-blocking extension)

The execution of these script takes a toll on the loading time of the page (from 2s to 10s, depending on the page). But it depends on how powerful your computer is.
Most of the scripts are used to display widgets (on the homepage or on the new title page) or track the user. They are also used to display the suggestion box of the search field. At the end only 4-5 scripts are loaded. The rest is blocked by this userscript.
In fact it prevents them from being executed, but doesn't prevent the browser from loading them. If you have an ad-blocker like uBlock Origin, you can double the effect by adding some rules (see below). But be warned that you'll have to check this page regularly to see if the block list changes (mine hasn't changed since I started using this script almost 2 years ago, in late 2019). Anyway, blocking at "an ad-blocking" level is not necessary.

The blocked scripts are loaded in the following circumstances:

  • always on the homepage (useless without)
  • always on the image viewer page (control buttons don't work without)
  • when the users starts to type something in the search field (takes 2-5s to complete).

    All images below when the search field is focused (user is ready to type).
    The search field before typing:


    during, and after typing:


    The search field thereafter, or on the homepage, or when the userscript is not applied (all scripts loaded):



    The userscript has been tested on chrome and firefox. If you encounter a problem, please post a message.


    For more userscripts, styles, extensions, tips, ..., visit my programming page.
    Feel free to look at my other imdb fixes: "IMDb - fix links", "IMDb - fullscreen imageviewer", "IMDb - fix title page"

    Filter list to use with uBlock Origin. Copy and paste in your "My filters" tab:
    ! << replace with the date at which you add this block in you filter list >>
    ! 5 filters used (but not needed) to help the userscript: https://greasyfork.org/scripts/431311-imdb-stop-scripts
    ! speed up imdb page load. Many scripts loaded from there. But still works without them.
    ||m.media-amazon.com/images/I/*$script,domain=imdb.com
    ! restore search suggestion (combined with userscript)
    @@||m.media-amazon.com/images/I/*?$script,domain=imdb.com
    ! 20210811: new "title" layout (film/episode)
    ||d1zcggttmijv1z.cloudfront.net/_next/static/$script,domain=imdb.com
    ! 20210811: killing scripts uses 100% cpu caused by this:
    www.imdb.com##.ipc-loader__circle,.ipc-loader__dot:style(animation: unset !important)
    !  (if :style is not supported by adblocker) www.imdb.com##svg.ipc-loader
    ! (new "title" layout) restore search suggestion (combined with userscript)
    @@||d1zcggttmijv1z.cloudfront.net/_next/static/*?$script,domain=imdb.com
    ! === END of filters used for userscript: https://greasyfork.org/scripts/431311-imdb-stop-scripts
    
    Adding these filters alone (without the script) achieves the same result. Except that the search field suggestion won't work, the homepage will have some parts missing, the image viewer won't be able to show previous or next image.