Ledger Nano X - The secure hardware wallet
SHARE
TWEET

MyAnimeList Add List Dropdown for Brink UserJS

ValerioLyndon May 18th, 2020 924 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         MyAnimeList Add List Dropdown for Brink
  3. // @namespace    V.L
  4. // @version      1.0
  5. // @description  Adds the dropdown selector for lists to your own list, instead of just other people's.
  6. // @author       Valerio Lyndon
  7. // @match        https://myanimelist.net/animelist/*
  8. // @match        https://myanimelist.net/mangalist/*
  9. // @grant        none
  10. // @licence      MIT
  11. // ==/UserScript==
  12.  
  13. var lt = document.body.getAttribute('data-work'),
  14.     user = document.body.getAttribute('data-owner-name'),
  15.     JS = `javascript:void(var drop = document.getElementById('header-menu-dropdown');
  16.     if (drop.style != 'display: block;') {
  17.         drop.style = 'display: block;';
  18.     } else {
  19.         drop.style = 'display: none;';
  20.     })`;
  21.  
  22. if (lt == 'manga') {
  23.     var btn = `Viewing Your <a href="${JS}" id="header-menu-button">Manga List <i class="fa fa-angle-down"></i></a>`,
  24.         dropdown = `<div id="header-menu-dropdown" class="list-menu">
  25.         <a class="icon-menu anime-list" href="/animelist/${user}">
  26.             <svg class="icon icon-anime-list" width="22px" height="20px" viewBox="0 0 22 20" version="1.1">
  27.                 <g>
  28.                     <path d="M2.20234783,18.8926957 C2.75913043,18.8926957 3.22256522,18.7076522 3.61165217,18.3177391 C4.00156522,17.9286522 4.1866087,17.4462174 4.1866087,16.8902609 C4.1866087,16.3524783 4.00156522,15.8890435 3.61165217,15.4991304 C3.22256522,15.1100435 2.75913043,14.925 2.20234783,14.925 C1.6463913,14.925 1.18295652,15.1100435 0.793043478,15.4991304 C0.403956522,15.8890435 0.218913043,16.3524783 0.218913043,16.8902609 C0.218913043,17.4462174 0.403956522,17.9286522 0.793043478,18.3177391 C1.18295652,18.7076522 1.6463913,18.8926957 2.20234783,18.8926957 L2.20234783,18.8926957 Z M2.20234783,13.5900435 C2.75913043,13.5900435 3.22256522,13.4041739 3.61165217,13.015087 C4.00156522,12.6251739 4.1866087,12.1435652 4.1866087,11.5867826 C4.1866087,11.049 4.00156522,10.5855652 3.61165217,10.1964783 C3.22256522,9.8073913 2.75913043,9.62152174 2.20234783,9.62152174 C1.6463913,9.62152174 1.18295652,9.8073913 0.793043478,10.1964783 C0.403956522,10.5855652 0.218913043,11.049 0.218913043,11.5867826 C0.218913043,12.1435652 0.403956522,12.6251739 0.793043478,13.015087 C1.18295652,13.4041739 1.6463913,13.5900435 2.20234783,13.5900435 L2.20234783,13.5900435 Z M2.20234783,8.30473913 C2.75913043,8.30473913 3.22256522,8.11969565 3.61165217,7.7306087 C4.00156522,7.34069565 4.1866087,6.85908696 4.1866087,6.32130435 C4.1866087,5.76452174 4.00156522,5.30108696 3.61165217,4.912 C3.22256522,4.52291304 2.75913043,4.33704348 2.20234783,4.33704348 C1.6463913,4.33704348 1.18295652,4.52291304 0.793043478,4.912 C0.403956522,5.30108696 0.218913043,5.76452174 0.218913043,6.32130435 C0.218913043,6.85908696 0.403956522,7.34069565 0.793043478,7.7306087 C1.18295652,8.11969565 1.6463913,8.30473913 2.20234783,8.30473913 L2.20234783,8.30473913 Z M5.61408696,18.1326957 C5.68843478,18.1880435 5.76278261,18.2252174 5.85530435,18.2252174 L18.4266957,18.2252174 C18.5200435,18.2252174 18.5935652,18.1880435 18.667913,18.1326957 C18.7232609,18.0583478 18.7604348,17.984 18.7604348,17.8914783 L18.7604348,15.9072174 C18.7604348,15.8146957 18.7232609,15.7403478 18.667913,15.666 C18.5935652,15.6106522 18.5200435,15.5734783 18.4266957,15.5734783 L5.85530435,15.5734783 C5.76278261,15.5734783 5.68843478,15.6106522 5.61408696,15.666 C5.53973913,15.7403478 5.52156522,15.8146957 5.52156522,15.9072174 L5.52156522,17.8914783 C5.52156522,17.984 5.53973913,18.0583478 5.61408696,18.1326957 L5.61408696,18.1326957 Z M5.61408696,12.8292174 C5.68843478,12.8853913 5.76278261,12.9217391 5.85530435,12.9217391 L18.4266957,12.9217391 C18.5200435,12.9217391 18.5935652,12.8853913 18.667913,12.8292174 C18.7232609,12.7548696 18.7604348,12.6813478 18.7604348,12.588 L18.7604348,10.6045652 C18.7604348,10.5120435 18.7232609,10.4376957 18.667913,10.3633478 C18.5935652,10.308 18.5200435,10.2708261 18.4266957,10.2708261 L5.85530435,10.2708261 C5.76278261,10.2708261 5.68843478,10.308 5.61408696,10.3633478 C5.53973913,10.4376957 5.52156522,10.5120435 5.52156522,10.6045652 L5.52156522,12.588 C5.52156522,12.6813478 5.53973913,12.7548696 5.61408696,12.8292174 L5.61408696,12.8292174 Z M5.56517435,7.54473913 C5.6002174,7.60091304 5.63526046,7.63726087 5.67886959,7.63726087 L11.6042606,7.63726087 C11.6482591,7.63726087 11.6829128,7.60091304 11.7179559,7.54473913 C11.7440435,7.4703913 11.761565,7.39686957 11.761565,7.30352174 L11.761565,5.32008696 C11.761565,5.22756522 11.7440435,5.15321739 11.7179559,5.07886957 C11.6829128,5.02352174 11.6482591,4.98634783 11.6042606,4.98634783 L5.67886959,4.98634783 C5.63526046,4.98634783 5.6002174,5.02352174 5.56517435,5.07886957 C5.5301313,5.15321739 5.52156522,5.22756522 5.52156522,5.32008696 L5.52156522,7.30352174 C5.52156522,7.39686957 5.5301313,7.4703913 5.56517435,7.54473913 L5.56517435,7.54473913 Z" id="Fill-125"></path>
  29.                     <path d="M15.0024414,5.50830078 L17.0112305,5.50830078 L16.0229492,2.39306641 L15.0024414,5.50830078 Z M15.1044922,0.583007812 L16.9736328,0.583007812 L19.7773438,8.5 L17.9833984,8.5 L17.4731445,6.87255859 L14.5566406,6.87255859 L14.0087891,8.5 L12.2792969,8.5 L15.1044922,0.583007812 Z" id="A"></path>
  30.                 </g>
  31.             </svg>
  32.             <span class="text">Anime List</span>
  33.         </a>
  34.     </div>`;
  35. } else {
  36.     var btn = `Viewing Your <a href="${JS}" id="header-menu-button">Anime List <i class="fa fa-angle-down"></i></a>`,
  37.         dropdown = `<div id="header-menu-dropdown" class="list-menu">
  38.         <a class="icon-menu manga-list" href="/mangalist/${user}">
  39.             <svg class="icon icon-manga-list" width="22px" height="20px" viewBox="0 0 22 20" version="1.1">
  40.                 <g>
  41.                     <path d="M2.20234783,18.8926957 C2.75913043,18.8926957 3.22256522,18.7076522 3.61165217,18.3177391 C4.00156522,17.9286522 4.1866087,17.4462174 4.1866087,16.8902609 C4.1866087,16.3524783 4.00156522,15.8890435 3.61165217,15.4991304 C3.22256522,15.1100435 2.75913043,14.925 2.20234783,14.925 C1.6463913,14.925 1.18295652,15.1100435 0.793043478,15.4991304 C0.403956522,15.8890435 0.218913043,16.3524783 0.218913043,16.8902609 C0.218913043,17.4462174 0.403956522,17.9286522 0.793043478,18.3177391 C1.18295652,18.7076522 1.6463913,18.8926957 2.20234783,18.8926957 L2.20234783,18.8926957 Z M2.20234783,13.5900435 C2.75913043,13.5900435 3.22256522,13.4041739 3.61165217,13.015087 C4.00156522,12.6251739 4.1866087,12.1435652 4.1866087,11.5867826 C4.1866087,11.049 4.00156522,10.5855652 3.61165217,10.1964783 C3.22256522,9.8073913 2.75913043,9.62152174 2.20234783,9.62152174 C1.6463913,9.62152174 1.18295652,9.8073913 0.793043478,10.1964783 C0.403956522,10.5855652 0.218913043,11.049 0.218913043,11.5867826 C0.218913043,12.1435652 0.403956522,12.6251739 0.793043478,13.015087 C1.18295652,13.4041739 1.6463913,13.5900435 2.20234783,13.5900435 L2.20234783,13.5900435 Z M2.20234783,8.30473913 C2.75913043,8.30473913 3.22256522,8.11969565 3.61165217,7.7306087 C4.00156522,7.34069565 4.1866087,6.85908696 4.1866087,6.32130435 C4.1866087,5.76452174 4.00156522,5.30108696 3.61165217,4.912 C3.22256522,4.52291304 2.75913043,4.33704348 2.20234783,4.33704348 C1.6463913,4.33704348 1.18295652,4.52291304 0.793043478,4.912 C0.403956522,5.30108696 0.218913043,5.76452174 0.218913043,6.32130435 C0.218913043,6.85908696 0.403956522,7.34069565 0.793043478,7.7306087 C1.18295652,8.11969565 1.6463913,8.30473913 2.20234783,8.30473913 L2.20234783,8.30473913 Z M5.61408696,18.1326957 C5.68843478,18.1880435 5.76278261,18.2252174 5.85530435,18.2252174 L18.4266957,18.2252174 C18.5200435,18.2252174 18.5935652,18.1880435 18.667913,18.1326957 C18.7232609,18.0583478 18.7604348,17.984 18.7604348,17.8914783 L18.7604348,15.9072174 C18.7604348,15.8146957 18.7232609,15.7403478 18.667913,15.666 C18.5935652,15.6106522 18.5200435,15.5734783 18.4266957,15.5734783 L5.85530435,15.5734783 C5.76278261,15.5734783 5.68843478,15.6106522 5.61408696,15.666 C5.53973913,15.7403478 5.52156522,15.8146957 5.52156522,15.9072174 L5.52156522,17.8914783 C5.52156522,17.984 5.53973913,18.0583478 5.61408696,18.1326957 L5.61408696,18.1326957 Z M5.61408696,12.8292174 C5.68843478,12.8853913 5.76278261,12.9217391 5.85530435,12.9217391 L18.4266957,12.9217391 C18.5200435,12.9217391 18.5935652,12.8853913 18.667913,12.8292174 C18.7232609,12.7548696 18.7604348,12.6813478 18.7604348,12.588 L18.7604348,10.6045652 C18.7604348,10.5120435 18.7232609,10.4376957 18.667913,10.3633478 C18.5935652,10.308 18.5200435,10.2708261 18.4266957,10.2708261 L5.85530435,10.2708261 C5.76278261,10.2708261 5.68843478,10.308 5.61408696,10.3633478 C5.53973913,10.4376957 5.52156522,10.5120435 5.52156522,10.6045652 L5.52156522,12.588 C5.52156522,12.6813478 5.53973913,12.7548696 5.61408696,12.8292174 L5.61408696,12.8292174 Z M5.56517435,7.54473913 C5.6002174,7.60091304 5.63526046,7.63726087 5.67886959,7.63726087 L11.6042606,7.63726087 C11.6482591,7.63726087 11.6829128,7.60091304 11.7179559,7.54473913 C11.7440435,7.4703913 11.761565,7.39686957 11.761565,7.30352174 L11.761565,5.32008696 C11.761565,5.22756522 11.7440435,5.15321739 11.7179559,5.07886957 C11.6829128,5.02352174 11.6482591,4.98634783 11.6042606,4.98634783 L5.67886959,4.98634783 C5.63526046,4.98634783 5.6002174,5.02352174 5.56517435,5.07886957 C5.5301313,5.15321739 5.52156522,5.22756522 5.52156522,5.32008696 L5.52156522,7.30352174 C5.52156522,7.39686957 5.5301313,7.4703913 5.56517435,7.54473913 L5.56517435,7.54473913 Z" id="Fill-125"></path>
  42.                     <path d="M18.0854492,0.583007812 L20.4648438,0.583007812 L20.4648438,8.5 L18.9233398,8.5 L18.9233398,3.14501953 C18.9233398,2.99104741 18.9251302,2.77531063 18.9287109,2.49780273 C18.9322917,2.22029484 18.934082,2.00634841 18.934082,1.85595703 L17.4355469,8.5 L15.8295898,8.5 L14.3417969,1.85595703 C14.3417969,2.00634841 14.3435872,2.22029484 14.347168,2.49780273 C14.3507487,2.77531063 14.3525391,2.99104741 14.3525391,3.14501953 L14.3525391,8.5 L12.8110352,8.5 L12.8110352,0.583007812 L15.2172852,0.583007812 L16.6567383,6.80810547 L18.0854492,0.583007812 Z" id="M"></path>
  43.                 </g>
  44.             </svg>
  45.             <span class="text">Manga List</span>
  46.         </a>
  47.     </div>`;
  48. }
  49.  
  50. if (document.body.getAttribute('data-owner') == 1) {
  51.     var style = document.createElement('style');
  52.         style.type = 'text/css';
  53.         style.textContent = `[data-owner="1"] .header .header-menu {
  54.         padding-right: 139px;
  55.     }`;
  56.     document.head.appendChild(style);
  57.     document.querySelector('.btn-menu').innerHTML = btn;
  58.     document.querySelector('.header-menu').innerHTML += dropdown;
  59. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top