Greasy Fork is available in English.

IMDb - stop scripts

Prevent unnecessary scripts from loading

Autor
Achernar
Denně instalací
0
Celkem instalací
272
Hodnocení
2 1 1
Verze
0.7.1
Vytvořeno
24. 08. 2021
Aktualizováno
10. 04. 2022
Licence
neuvedeno
Spustit na

The userscript has been tested on chrome and firefox. If you encounter a problem, please post a message. I might have something to fix to make it work for you.

Every IMDb page loads more than 30 scripts (almost 50 on the new "title" page). 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 ; and for logged in users, to rate a film, handle watchlist... At the end only 4-5 of all the 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):



    For more userscripts, styles, extensions, tips, ..., visit my programming page.
    Feel free to look at my other imdb fixes: "fix title page / title page old layout" , "Fix links" , "Fix rating" , "Stop scripts" , "Fullscreen imageviewer" , "Set default user reviews sorting"

    Filter list to use with uBlock Origin. Copy and paste in your "My filters" tab: (last modified: 2022-03-22)
    ! << 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=www.imdb.com
    ! restore search suggestion (combined with userscript)
    @@||m.media-amazon.com/images/I/*?$script,domain=www.imdb.com
    ! 20210811 20220322: new "title" layout (film/episode)
    ||cloudfront.net/_next/static/$script,domain=www.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
    ! 20210811 20220322: (new "title" layout) restore search suggestion (combined with userscript)
    @@||cloudfront.net/_next/static/*?$script,domain=www.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.