WMEBR Filter

Filter the PURs results on the wmebr website to only show what we can handle

安装此脚本?
作者推荐脚本

您可能也喜欢WME Language Forcer

安装此脚本
  1. // ==UserScript==
  2. // @name WMEBR Filter
  3. // @namespace https://gitlab.com/WMEScripts
  4. // @description Filter the PURs results on the wmebr website to only show what we can handle
  5. // @match https://wmebr.info/ur/purs_on_state.php*
  6. // @version 2018.12.31.01
  7. // @author tunisiano18 '2018
  8. // @license MIT/BSD/X11
  9. // @compatible chrome firefox
  10. // @supportURL mailto:incoming+WMEScripts/WME-language-forcer@incoming.gitlab.com
  11. // @contributionURL http://ko-fi.com/tunisiano
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. ///////////////////////////////////////
  16. // Verification de la mise à jour //
  17. ///////////////////////////////////////
  18. var WMEFilterVersion = GM_info.script.version;
  19. var WMEFilterUpdateNotes = "Nouvelle version de WMEFilter : " + WMEFilterVersion;
  20. if (localStorage.getItem('WMEFilterVersion') === WMEFilterVersion && 'WMEFilterVersion' in localStorage) {
  21.  
  22. } else if ('WMEFilterVersion' in localStorage) {
  23. alert(WMEFilterUpdateNotes);
  24. localStorage.setItem('WMEFilterVersion', WMEFilterVersion);
  25. } else {
  26. localStorage.setItem('WMEFilterVersion', WMEFilterVersion);
  27. }
  28.  
  29. (function() {
  30. 'use strict';
  31.  
  32. var fullpath = "https://wmebr.info/ur/purs_on_state.php";
  33.  
  34. if(window.location.hash == ("#reset-WMEBR-editor-level")) {
  35. localStorage.removeItem('WME-editor-level');
  36. alert("Level resetted");
  37. if('WMEBR-last-page' in localStorage) {
  38. fullpath = localStorage.getItem('WMEBR-last-page');
  39. }
  40. window.location.href = fullpath;
  41. }
  42. // Adding the link to the menu
  43. $("#navbar ul.navbar-nav").append('<li><a href="purs_on_state.php#reset-WMEBR-editor-level">Reset editor level (' + localStorage.getItem('WME-editor-level') + ')</a></li>');
  44.  
  45. // Getting the last query
  46. fullpath = window.location.pathname+window.location.search;
  47. localStorage.setItem('WMEBR-last-page',fullpath);
  48.  
  49. var WMEeditorlevel=2;
  50.  
  51. if('WME-editor-level' in localStorage && localStorage.getItem('WME-editor-level') !=='0') {
  52. WMEeditorlevel = localStorage.getItem('WME-editor-level');
  53. } else
  54. {
  55. WMEeditorlevel=prompt("What is your editor level ?", WMEeditorlevel);
  56. localStorage.setItem('WME-editor-level',parseInt(WMEeditorlevel));
  57. }
  58. $('#grid tr td:nth-child(4)').each(function() {
  59. var $Cell = $(this);
  60. if(parseInt($Cell.text())>WMEeditorlevel){
  61. $(this).parent().hide();
  62. }
  63. });
  64. })();