FA Fixes Control Panel

Adds a control panel of fixes to the FurAffinity website, so you can enable/disable them at will.

  1. // ==UserScript==
  2. // @name FA Fixes Control Panel
  3. // @namespace FurAffinity.net
  4. // @version 1.5.1
  5. // @description Adds a control panel of fixes to the FurAffinity website, so you can enable/disable them at will.
  6. // @author JaysonHusky
  7. // @match *://www.furaffinity.net/*
  8. // @exclude *://www.furaffinity.net/login/
  9. // @exclude *://www.furaffinity.net/logout/
  10. // @exclude *://www.furaffinity.net/controls/submissions/
  11. // @exclude *://www.furaffinity.net/controls/settings/
  12. // @grant GM_getValue
  13. // @grant GM_setValue
  14. // @require http://code.jquery.com/jquery-latest.js
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. 'use strict';
  19. var TemplateStyle=$('body').attr('data-static-path');
  20. // Load Current Settings
  21. function FAFCP_LoadCP(i){
  22. var setting_returned = GM_getValue(i);
  23. if(setting_returned=="yes"){
  24. $('#'+i+'_yes').prop("checked", true);
  25. }
  26. else if(setting_returned=="no") {
  27. $('#'+i+'_no').prop("checked", true);
  28. }
  29. else {
  30. console.log('[DEBUG}: Setting: '+i+' Returned: '+setting_returned+' (Result not valid, or control not set)');
  31. }
  32. }
  33. function FAFCP_Load_Tweaks(i){
  34. var setting_returned = GM_getValue(i);
  35. if(setting_returned=="yes"){
  36. return "yes";
  37. }
  38. else if(setting_returned=="no") {
  39. return "no";
  40. }
  41. else {
  42. return "undefined";
  43. }
  44. }
  45. function FAFCP_SaveSettings(fafcp_nct,fafcp_sbg,fafcp_hs,fafcp_os,fafcp_sst,fafcp_sstpo,fafcp_fn,fafcp_tp,fafcp_nf,fafcp_bbf){
  46. GM_setValue('fafcp_nct',fafcp_nct);GM_setValue('fafcp_sbg',fafcp_sbg);GM_setValue('fafcp_hs',fafcp_hs);GM_setValue('fafcp_os',fafcp_os);
  47. GM_setValue('fafcp_sst',fafcp_sst);GM_setValue('fafcp_sstpo',fafcp_sstpo);GM_setValue('fafcp_fn',fafcp_fn);GM_setValue('fafcp_tp',fafcp_tp);
  48. GM_setValue('fafcp_nf',fafcp_nf);GM_setValue('fafcp_bbf',fafcp_bbf);
  49. }
  50. function ExecuteTweak(tweak){
  51. switch(tweak) {
  52. case "NoCustomThumbnails":
  53. $("img[src*='t.facdn.net']").each(function(index){
  54. var thumburl=$(this).attr('src').replace("@150","@400");
  55. $(this).attr("src",thumburl);
  56. });
  57. break;
  58. case "SidebarBeGone":
  59. $("<style>#submission_page .submission-sidebar{position:fixed;top:50px;bottom:0px;right:-290px;z-index:1000000;background:rgba(1,0,0,0.6);transition: 0.5s all;height: 800px;}#submission_page .submission-sidebar:hover{position:absolute;top:50px;bottom:0px;right:0px;z-index:1000000;background:rgba(1,0,0,0.9);transition: 0.5s all;height:800px;}</style>").appendTo("head");
  60. break;
  61. case "HiddenStreams":
  62. $("<style>div#messagecenter-other ul.message-stream li.stream-notification{display:none;}</style>").appendTo("head");
  63. break;
  64. case "ObviousStreams":
  65. $("<style>div#messagecenter-other ul.message-stream li.stream-notification{background: rgba(255,255,255,0.5);color: black;border: 0.5px dashed black;}div#messagecenter-other ul.message-stream li.stream-notification a {color: black;}</style>").appendTo("head");
  66. break;
  67. case "SameSizeThumbnails":
  68. $("<style>figure.r-general u a img,figure.r-mature u a img,figure.r-adult u a img{height:150px !important;width:150px !important;}</style>").appendTo("head");
  69. break;
  70. case "SameSizeThumbnailsPO":
  71. $("<style>.userpage-gallery-item img,.userpage-favorites-item img{height: 150px;width: 150px;}</style>").appendTo("head");
  72. break;
  73. case "FixedNavigation":
  74. $("<style>nav#ddmenu{position:fixed;background:black;}.site-banner{margin-top:50px;}</style>").appendTo("head");
  75. break;
  76. case "TidyProfile":
  77. var ProfileSize=480;
  78. if ($('.userpage-layout-profile-container').height()>ProfileSize){
  79. $('.userpage-layout-profile-container').css('height',''+ProfileSize+'px');
  80. $('.userpage-layout-profile-container').css('overflow-y','auto');
  81. }
  82. break;
  83. case "NoteFix":
  84. $('<style>#JSMessage{background: #3c3c3c !important;}.textbox, .textarea{background: #3c3c3c !important;border-radius:5px;}</style>').appendTo("head");
  85. break;
  86. case "BringBackButtons":
  87. $('.flex-submission-container').before('<div style="width:31%;margin:5px auto;">'+$('.sidebar-section').html()+'</div>');
  88. $('.sidebar-section').first().hide();
  89. break;
  90. default:
  91. /* No Code */
  92. }
  93. }
  94. var pathx = window.location.pathname;
  95. if(~pathx.indexOf("/controls/user-settings/")){
  96. // Update
  97. $(document.body).on('click', '#fafcp_saveit', function() {
  98. var fafcp_set_nct = $("input[name='fafcp_nct']:checked").val(); var fafcp_set_sbg = $("input[name='fafcp_sbg']:checked").val();
  99. var fafcp_set_hs = $("input[name='fafcp_hs']:checked").val(); var fafcp_set_os = $("input[name='fafcp_os']:checked").val();
  100. var fafcp_set_sst = $("input[name='fafcp_sst']:checked").val(); var fafcp_set_sstpo = $("input[name='fafcp_sst']:checked").val();
  101. var fafcp_set_fn = $("input[name='fafcp_fn']:checked").val(); var fafcp_set_tp = $("input[name='fafcp_tp']:checked").val();
  102. var fafcp_set_nf = $("input[name='fafcp_nf']:checked").val(); var fafcp_set_bbf = $("input[name='fafcp_bbf']:checked").val();
  103. FAFCP_SaveSettings(fafcp_set_nct,fafcp_set_sbg,fafcp_set_hs,fafcp_set_os,fafcp_set_sst,fafcp_set_sstpo,fafcp_set_fn,fafcp_set_tp,fafcp_set_nf,fafcp_set_bbf);
  104. $('.faf-update-status_x').fadeIn('slow');
  105. setTimeout(function(){
  106. $('.faf-update-status_x').fadeOut('slow');
  107. }, 5000);
  108. });
  109. if(TemplateStyle=="/themes/beta"){
  110. $('.content .section-body').after(`
  111. <div id="customfacontrolpanel" style="border:1px dashed white; background: rgba(1,0,0,0.1); padding: 5px; border-radius: 5px; margin-top: 20px;">
  112. <h2>FA Fixes Control Panel <span class="faf-update-status_x" style="font-weight: bold; color: #02cc02; float:right; clear:right; display: none;">Update successful!</span></h2>
  113. <br/>
  114. <strong>No Custom Thumbnails</strong>
  115. <div class="control-panel-option">
  116. <div class="control-panel-item-1">
  117. <p>Disables Furaffinity from showing custom thumbnails on all submissions. Replacing the original thumbnails with a scaled down version of the actual submission.</p>
  118. </div>
  119. <div class="control-panel-item-2">
  120. <input type="radio" id="fafcp_nct_yes" name="fafcp_nct" value="yes" /><label for="fafcp_nct_yes">Enable</label><br/>
  121. <input type="radio" id="fafcp_nct_no" name="fafcp_nct" value="no"/><label for="fafcp_nct_no">Disable</label>
  122. </div>
  123. </div>
  124. <strong>Sidebar-Be-Gone</strong>
  125. <div class="control-panel-option">
  126. <div class="control-panel-item-1">
  127. <p>Relocates the sidebar off the screen, so it can be activated by hovering over it. <br/><i>Fixes the fullscreen submission bug</i></p>
  128. </div>
  129. <div class="control-panel-item-2">
  130. <input type="radio" id="fafcp_sbg_yes" name="fafcp_sbg" value="yes"/><label for="fafcp_sbg_yes">Enable</label><br/>
  131. <input type="radio" id="fafcp_sbg_no" name="fafcp_sbg" value="no"/><label for="fafcp_sbg_no">Disable</label>
  132. </div>
  133. </div>
  134. <strong>No Streams</strong>
  135. <div class="control-panel-option">
  136. <div class="control-panel-item-1">
  137. <p>Hides all stream notifications in the notifications centre.<br/><i><b>Important:</b> Does not change the notifications counter!</i></p>
  138. </div>
  139. <div class="control-panel-item-2">
  140. <input type="radio" id="fafcp_hs_yes" name="fafcp_hs" value="yes"/><label for="fafcp_hs_yes">Enable</label><br/>
  141. <input type="radio" id="fafcp_hs_no" name="fafcp_hs" value="no"/><label for="fafcp_hs_no">Disable</label>
  142. </div>
  143. </div>
  144. <strong>Obvious Streams</strong>
  145. <div class="control-panel-option">
  146. <div class="control-panel-item-1">
  147. <p>Re-styles stream notifications to make them more obvious in the notification's centre.</p>
  148. </div>
  149. <div class="control-panel-item-2">
  150. <input type="radio" id="fafcp_os_yes" name="fafcp_os" value="yes"/><label for="fafcp_os_yes">Enable</label><br/>
  151. <input type="radio" id="fafcp_os_no" name="fafcp_os" value="no"/><label for="fafcp_os_no">Disable</label>
  152. </div>
  153. </div>
  154. <strong>Same Size Thumbnails Submissions Only</strong>
  155. <div class="control-panel-option">
  156. <div class="control-panel-item-1">
  157. <p>Adjusts all thumbnails of submissions to be of the same size (150px x 150px)</p>
  158. </div>
  159. <div class="control-panel-item-2">
  160. <input type="radio" id="fafcp_sst_yes" name="fafcp_sst" value="yes"/><label for="fafcp_sst_yes">Enable</label><br/>
  161. <input type="radio" id="fafcp_sst_no" name="fafcp_sst" value="no"/><label for="fafcp_sst_no">Disable</label>
  162. </div>
  163. </div>
  164. <strong>Same Size Thumbnails Profiles Only</strong>
  165. <div class="control-panel-option">
  166. <div class="control-panel-item-1">
  167. <p>Adjusts all thumbnails on profile pages to be of the same size (150px x 150px)</p>
  168. </div>
  169. <div class="control-panel-item-2">
  170. <input type="radio" id="fafcp_sstpo_yes" name="fafcp_sstpo" value="yes"/><label for="fafcp_sstpo_yes">Enable</label><br/>
  171. <input type="radio" id="fafcp_sstpo_no" name="fafcp_sstpo" value="no"/><label for="fafcp_sstpo_no">Disable</label>
  172. </div>
  173. </div>
  174. <strong>Fixed Navigation</strong>
  175. <div class="control-panel-option">
  176. <div class="control-panel-item-1">
  177. <p>Places the navigation bar in a fixed position, so it scrolls with the page</p>
  178. </div>
  179. <div class="control-panel-item-2">
  180. <input type="radio" id="fafcp_fn_yes" name="fafcp_fn" value="yes"/><label for="fafcp_fn_yes">Enable</label><br/>
  181. <input type="radio" id="fafcp_fn_no" name="fafcp_fn" value="no"/><label for="fafcp_fn_no">Disable</label>
  182. </div>
  183. </div>
  184. <strong>Tidy Profile</strong>
  185. <div class="control-panel-option">
  186. <div class="control-panel-item-1">
  187. <p>Add's a scroll bar to the the user profile section, if it's determined to be too long, to avoid unnesscessary scrolling.</p>
  188. </div>
  189. <div class="control-panel-item-2">
  190. <input type="radio" id="fafcp_tp_yes" name="fafcp_tp" value="yes"/><label for="fafcp_tp_yes">Enable</label><br/>
  191. <input type="radio" id="fafcp_tp_no" name="fafcp_tp" value="no"/><label for="fafcp_tp_no">Disable</label>
  192. </div>
  193. </div>
  194. <strong>NoteFix</strong>
  195. <div class="control-panel-option">
  196. <div class="control-panel-item-1">
  197. <p>Fixes the almost invisible textboxes/textarea's</p>
  198. </div>
  199. <div class="control-panel-item-2">
  200. <input type="radio" id="fafcp_nf_yes" name="fafcp_nf" value="yes"/><label for="fafcp_nf_yes">Enable</label><br/>
  201. <input type="radio" id="fafcp_nf_no" name="fafcp_nf" value="no"/><label for="fafcp_nf_no">Disable</label>
  202. </div>
  203. </div>
  204. <strong>Bring Back Buttons</strong>
  205. <div class="control-panel-option">
  206. <div class="control-panel-item-1">
  207. <p>Brings back the submission buttons when the sidebar is hidden <br/> For widths between 480px &amp; 1070px</p>
  208. </div>
  209. <div class="control-panel-item-2">
  210. <input type="radio" id="fafcp_bbf_yes" name="fafcp_bbf" value="yes"/><label for="fafcp_bbf_yes">Enable</label><br/>
  211. <input type="radio" id="fafcp_bbf_no" name="fafcp_bbf" value="no"/><label for="fafcp_bbf_no">Disable</label>
  212. </div>
  213. </div>
  214. <div class="button-nav">
  215. <div class="button-nav-item">
  216. <input class="button mobile-button" id="fafcp_saveit" type="button" value="Save FAFCP Settings*">
  217. </div>
  218. </div>
  219. <br/><b>*Updates take effect from the next page load</b><br/><span style="font-size:10px;">FAFCP by <a href="https://www.furaffinity.net/user/feralfrenzy" style="border-bottom:1px dotted white;">JaysonHusky</a></span>
  220. </div>
  221. `);
  222. }
  223. else {
  224. $('.footer').before(`<table cellpadding="0" cellspacing="1" border="0" class="section maintable" style="width: 60%; margin: 0 auto;">
  225. <tbody>
  226. <tr>
  227. <td height="22" class="cat links">&nbsp;
  228. <strong>FurAffinity Fixes - Control Panel</strong>
  229. <span class="faf-update-status" style="font-weight: bold; color: #7cfc00; float:right; clear:right; display: none;">Update successful!</span>
  230. </td>
  231. </tr>
  232. <tr>
  233. <td class="alt1 addpad ucp-site-settings" align="center">
  234. <table cellpadding="0" cellspacing="1" border="0">
  235. <tbody>
  236. <tr>
  237. <th><strong>No Streams</strong></th>
  238. <td>
  239. <input type="radio" id="fafcp_hs_yes" name="fafcp_hs" value="yes"/><label for="fafcp_hs_yes">Enable</label><br/>
  240. <input type="radio" id="fafcp_hs_no" name="fafcp_hs" value="no"/><label for="fafcp_hs_no">Disable</label>
  241. </td>
  242. <td class="option-description">
  243. <p>Hides all stream notifications in the notifications centre.<br/><i><b>Important:</b> Does not change the notifications counter!</i></p>
  244. </td>
  245. </tr>
  246. <tr>
  247. <th><strong>Obvious Streams</strong></th>
  248. <td>
  249. <input type="radio" id="fafcp_os_yes" name="fafcp_os" value="yes"/><label for="fafcp_os_yes">Enable</label><br/>
  250. <input type="radio" id="fafcp_os_no" name="fafcp_os" value="no"/><label for="fafcp_os_no">Disable</label>
  251. </td>
  252. <td class="option-description">
  253. <p>Re-styles stream notifications to make them more obvious in the notification's centre.</p>
  254. </td>
  255. </tr>
  256. <th class="noborder">&nbsp;</th>
  257. <td class="noborder">&nbsp;</td>
  258. <td class="option-description noborder">
  259. <br>
  260. <input class="button mobile-button" id="fafcp_saveit" type="button" value="Save FAFCP Settings*">
  261. <br/>
  262. <span style="font-size:10px;">FAFCP by <a href="https://www.furaffinity.net/user/feralfrenzy" style="border-bottom:1px dotted white;">JaysonHusky</a></span><br/><br/>
  263. <b>*Updates take effect from the next page load</b>
  264. </td>
  265. </tr>
  266. </tbody>
  267. </table>
  268. `);
  269. }
  270. }
  271. // Load the users settings
  272. $.each(["fafcp_nct","fafcp_sbg","fafcp_hs","fafcp_os","fafcp_sst","fafcp_sstpo","fafcp_fn","fafcp_tp","fafcp_nf","fafcp_bbf"],function(i,l){
  273. FAFCP_LoadCP(l);
  274. });
  275. // Check and Run the Tweaks if required
  276. if(FAFCP_Load_Tweaks('fafcp_nct')=="yes"){ExecuteTweak('NoCustomThumbnails');}else{/* Do Nothing */}
  277. if(FAFCP_Load_Tweaks('fafcp_sbg')=="yes"){ExecuteTweak('SidebarBeGone');}else{/* Do Nothing */}
  278. if(FAFCP_Load_Tweaks('fafcp_hs')=="yes"){ExecuteTweak('HiddenStreams');}else{/* Do Nothing */}
  279. if(FAFCP_Load_Tweaks('fafcp_os')=="yes"){ExecuteTweak('ObviousStreams');}else{/* Do Nothing */}
  280. if(FAFCP_Load_Tweaks('fafcp_sst')=="yes"){ExecuteTweak('SameSizeThumbnails');}else{/* Do Nothing */}
  281. if(FAFCP_Load_Tweaks('fafcp_sstpo')=="yes"){ExecuteTweak('SameSizeThumbnailsPO');}else{/* Do Nothing */}
  282. if(FAFCP_Load_Tweaks('fafcp_fn')=="yes"){ExecuteTweak('FixedNavigation');}else{/* Do Nothing */}
  283. if(FAFCP_Load_Tweaks('fafcp_tp')=="yes"){ExecuteTweak('TidyProfile');}else{/* Do Nothing */}
  284. if(FAFCP_Load_Tweaks('fafcp_nf')=="yes"){ExecuteTweak('NoteFix');}else{/* Do Nothing */}
  285. if(FAFCP_Load_Tweaks('fafcp_bbf')=="yes"){ExecuteTweak('BringBackButtons');}else{/* Do Nothing */}
  286. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址