0 of 0

File information

Last updated

Original upload

Created by

Edvin

Uploaded by

edvin76

Virus scan

Safe to use

About this mod

Tampermonkey script to remove reshades, presets and save files from the mod list,
most of them anyway.
compare screenshots to see. (Madness!)

Requirements
Permissions and credits
Changelogs
Donations
This is for switching them on and off easily, if you want a permanent solution, look at these threads:

https://forums.nexusmods.com/index.php?showtopic=9429963/#entry88303398

https://forums.nexusmods.com/index.php?showtopic=9429963/#entry88312053

Basically:



// ==UserScript==
// @name         Sanitize
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  try to take over the world!
// @author       You (are breathtaking!)
// @match      https://www.nexusmods.com/cyberpunk2077
// @match      https://www.nexusmods.com/cyberpunk2077/mods/*
// @match      https://www.nexusmods.com/cyberpunk2077/trending/
// @match      https://www.nexusmods.com/cyberpunk2077/mods/categories/
// @match      https://www.nexusmods.com/cyberpunk2077?tab=*
// @grant        none
// @run-at            document-end
// @require  https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==

this.$ = this.jQuery = window.jQuery.noConflict(true);



(function() {





 var m = window.jQuery("#mod-list");
 var g = window.jQuery("#game-mods");
    if (m.length > 0 || g.length > 0)
    {
        console.log("we r here");


           window.jQuery(document).ajaxStop(function () {
   console.log("ajaxStop complete");
       updateHTML();
});

            window.jQuery(document).ajaxComplete(function (e, request, settings) {
        console.log("ajaxComplete start to remove clutter", settings);
         updateHTML();
        })


     if(g.length > 0)
     {
console.log('g'+g.length);
  var origOpen = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.open = function() {
        console.log('request started!');
        this.addEventListener('load', function() {
            //console.log('request completed!');
            console.log('sanitize!');
            updateHTML();
            //location.reload();
          //  console.log(this.readyState); //will always be 4 (ajax is completed successfully)
          //  console.log(this.responseText); //whatever the response was
        });
        origOpen.apply(this, arguments);
    };


     }



    if (document.URL.endsWith("cyberpunk2077") ||
        document.URL.endsWith("cyberpunk2077/mods/") ||
        document.URL.endsWith("mods/trending/") ||
        document.URL.includes("mods/categories/")
        //document.URL.endsWith("cyberpunk2077?tab=new+today") ||
      //  document.URL.endsWith("cyberpunk2077?tab=new+this+week") ||
     //   document.URL.endsWith("cyberpunk2077?tab=popular+(30+days)") ||
     //   document.URL.endsWith("cyberpunk2077?tab=popular+(all+time)") ||
     //   document.URL.endsWith("cyberpunk2077?tab=more+trending") ||
     //   document.URL.endsWith("cyberpunk2077?tab=random") ||
    //    document.URL.endsWith("cyberpunk2077?tab=updated")
       )
        {
        if(!document.URL.endsWith("/mods/categories"))
    {
            updateHTML();
    }
        }











function updateHTML()
{


console.log("wtf0");
/* globals $ */

      $('li').each(function(){
        if($(this).text().toLowerCase().includes("reshade") ||
           $(this).text().toLowerCase().includes("shader") ||
            $(this).text().toLowerCase().includes("savegame") ||
           $(this).text().toLowerCase().includes("save game") ||
            $(this).text().toLowerCase().includes("savegames") ||
           $(this).text().toLowerCase().includes("save games") ||
            $(this).text().toLowerCase().includes("preset") ||
           $(this).text().toLowerCase().includes("presets") ||
           $(this).text().toLowerCase().includes("savefile") ||
           $(this).text().toLowerCase().includes("savefiles") ||
           $(this).text().toLowerCase().includes("save file") ||
           $(this).text().toLowerCase().includes("saved file") ||
           $(this).text().toLowerCase().includes("save files") ||
           $(this).text().toLowerCase().includes("starting save") ||
           $(this).text().toLowerCase().includes("starting saves") ||
           $(this).text().toLowerCase().includes("starter save") ||
           $(this).text().toLowerCase().includes("starter saves") ||
           $(this).text().toLowerCase().includes("fresh start") ||
           $(this).text().toLowerCase().includes("mode plus") ||
           $(this).text().toLowerCase().includes("save location") ||
            $(this).text().includes("Characters"))
            {
                console.log("wtf");
                if(!$(this).text().includes("CP2077 Nexus Mods Declutter"))
                {
                    console.log("wtf2");
                    $(this).remove();
                }
            }
    });

}

    }
})();