// ==UserScript== // @name FA Fixes Control Panel // @namespace FurAffinity.net // @version 1.3.1 // @description Adds a control panel of fixes to the FurAffinity website, so you can enable/disable them at will. // @author JaysonHusky // @match *://www.furaffinity.net/* // @grant GM_getValue // @grant GM_setValue // @require http://code.jquery.com/jquery-latest.js // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Load Current Settings function FAFCP_LoadCP(i){ var setting_returned = GM_getValue(i); if(setting_returned=="yes"){ $('#'+i+'_yes').prop("checked", true); } else if(setting_returned=="no") { $('#'+i+'_no').prop("checked", true); } else { console.log('Setting: '+i+' Returned: '+setting_returned+' (Other Result)'); } } function FAFCP_Load_Tweaks(i){ var setting_returned = GM_getValue(i); if(setting_returned=="yes"){ return "yes"; } else if(setting_returned=="no") { return "no"; } else { return "undefined"; } } function FAFCP_SaveSettings(fafcp_nct,fafcp_sbg,fafcp_hs,fafcp_os,fafcp_sst,fafcp_fn,fafcp_tp){ GM_setValue('fafcp_nct',fafcp_nct);GM_setValue('fafcp_sbg',fafcp_sbg);GM_setValue('fafcp_hs',fafcp_hs);GM_setValue('fafcp_os',fafcp_os); GM_setValue('fafcp_sst',fafcp_sst);GM_setValue('fafcp_fn',fafcp_fn);GM_setValue('fafcp_tp',fafcp_tp); } function ExecuteTweak(tweak){ switch(tweak) { case "NoCustomThumbnails": $("img[src*='t.facdn.net']").each(function(index){ var thumburl=$(this).attr('src').replace("@150","@400"); $(this).attr("src",thumburl); }); break; case "SidebarBeGone": $("").appendTo("head"); break; case "HiddenStreams": $("").appendTo("head"); break; case "ObviousStreams": $("").appendTo("head"); break; case "SameSizeThumbnails": $("").appendTo("head"); break; case "FixedNavigation": $("").appendTo("head"); break; case "TidyProfile": var ProfileSize = 480; // (Defines max amount of profile that should be shown, the rest is still DOM loaded but hidden by overflow) if ($('.userpage-profile-info').height() > ProfileSize) { // Check for height $('.userpage-profile-info').css('height',''+ProfileSize+'px'); // Set new height $('.userpage-profile-info').css('overflow-y','auto'); // Allow overflow of remaining content } break; default: /* No Code */ } } var pathx = window.location.pathname; if(~pathx.indexOf("/controls/user-settings/")){ // Update $(document.body).on('click', '#fafcp_saveit', function() { var fafcp_set_nct = $("input[name='fafcp_nct']:checked").val(); var fafcp_set_sbg = $("input[name='fafcp_sbg']:checked").val(); var fafcp_set_hs = $("input[name='fafcp_hs']:checked").val(); var fafcp_set_os = $("input[name='fafcp_os']:checked").val(); var fafcp_set_sst = $("input[name='fafcp_sst']:checked").val(); var fafcp_set_fn = $("input[name='fafcp_fn']:checked").val(); var fafcp_set_tp = $("input[name='fafcp_tp']:checked").val(); FAFCP_SaveSettings(fafcp_set_nct,fafcp_set_sbg,fafcp_set_hs,fafcp_set_os,fafcp_set_sst,fafcp_set_fn,fafcp_set_tp); $('.faf-update-status').fadeIn('slow'); setTimeout(function() { $('.faf-update-status').fadeOut('slow'); }, 5000); }); if(STATIC_PATH=="/themes/beta"){ $('.button-nav').after(`
Disables Furaffinity from showing custom thumbnails on all submissions. Replacing the original thumbnails with a scaled down version of the actual submission.
Relocates the sidebar off the screen, so it can be activated by hovering over it.
Fixes the fullscreen submission bug
Hides all stream notifications in the notifications centre.
Important: Does not change the notifications counter!
Re-styles stream notifications to make them more obvious in the notification's centre.
Adjusts all thumbnails on profile pages to be of the same size (150px x 150px)
Places the navigation bar in a fixed position, so it scrolls with the page
Add's a scroll bar to the the user profile section, if it's determined to be too long, to avoid unnesscessary scrolling.
FurAffinity Fixes - Control Panel | |||||||||
|
`);
}
}
// Load the users settings
$.each(["fafcp_nct","fafcp_sbg","fafcp_hs","fafcp_os","fafcp_sst","fafcp_fn","fafcp_tp"],function(i,l){
FAFCP_LoadCP(l);
});
// Check and Run the Tweaks if required
if(FAFCP_Load_Tweaks('fafcp_nct')=="yes"){ExecuteTweak('NoCustomThumbnails');} else { /* Do Nothing */ }
if(FAFCP_Load_Tweaks('fafcp_sbg')=="yes"){ExecuteTweak('SidebarBeGone');} else { /* Do Nothing */ }
if(FAFCP_Load_Tweaks('fafcp_hs')=="yes"){ExecuteTweak('HiddenStreams');} else { /* Do Nothing */ }
if(FAFCP_Load_Tweaks('fafcp_os')=="yes"){ExecuteTweak('ObviousStreams');} else { /* Do Nothing */ }
if(FAFCP_Load_Tweaks('fafcp_sst')=="yes"){ExecuteTweak('SameSizeThumbnails');} else { /* Do Nothing */ }
if(FAFCP_Load_Tweaks('fafcp_fn')=="yes"){ExecuteTweak('FixedNavigation');} else { /* Do Nothing */ }
if(FAFCP_Load_Tweaks('fafcp_tp')=="yes"){ExecuteTweak('TidyProfile');} else { /* Do Nothing */ }
})();