Desktop Mode - MAL

Forces MAL always be opened on Desktop View Mode.

当前为 2023-06-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Desktop Mode - MAL
  3. // @namespace https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
  4. // @version 5
  5. // @description Forces MAL always be opened on Desktop View Mode.
  6. // @author hacker09
  7. // @match https://myanimelist.net/*
  8. // @icon https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://myanimelist.net&size=64
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. if (document.querySelector('.footer-desktop-button') !== null) //If the cookie wasn't already set
  16. { //Starts the if condition
  17. location.reload(); //Reloads the page
  18. } //Finishes the if condition
  19. document.cookie = 'view=pc;path=/;Expires=' + new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 365).toGMTString() + ';'; //Set the desktop mode cookie
  20. })();