🏠 Home 

Pixiv Additional Navigator

Add navigation menu.


Install this script?
  1. // ==UserScript==
  2. // @name Pixiv Additional Navigator
  3. // @name:ja Pixiv Additional Navigator
  4. // @namespace https://greasyfork.org/ja/users/166153-hac
  5. // @version 1.1.1
  6. // @description Add navigation menu.
  7. // @description:ja Pixivにナビゲーションメニューを追加して作品一覧やブックマークへのアクセスをよくします。2019年末のPixivのUI改変にキレて作りました。
  8. // @author HAC
  9. // @match https://www.pixiv.net/*
  10. // @grant none
  11. // @license MIT License
  12. // @noframes
  13. // ==/UserScript==
  14. {
  15. 'use strict';
  16. const userstyle = `
  17. #additional_navigator {
  18. margin: 4px auto 0;
  19. padding: 0;
  20. width: 970px;
  21. display: flex;
  22. list-style: none;
  23. border-bottom: 1px solid #e4e7ee;
  24. box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
  25. }
  26. #additional_navigator > li {
  27. border-radius: 5px 5px 0 0;
  28. background-color: #fbfbfb;
  29. flex-grow: 1;
  30. }
  31. #additional_navigator > li:not(:last-child) {
  32. border-right: 1px solid #e4e7ee;
  33. }
  34. #additional_navigator > li > a {
  35. display: block;
  36. text-align: center;
  37. font-size: 14px;
  38. line-height: 32px;
  39. color: #258fb8;
  40. text-decoration: none;
  41. }
  42. #additional_navigator > li > a:hover {
  43. background: #f2f4f6;
  44. text-decoration: none;
  45. }
  46. #header-banner.spa {
  47. margin-top: 32px;
  48. }
  49. `;
  50. const head = document.getElementsByTagName('head')[0];
  51. const style = document.createElement('style');
  52. style.type = 'text/css';
  53. style.innerHTML = userstyle;
  54. head.appendChild(style);
  55. const textArray = [
  56. {title: 'トップ', url: '/'},
  57. {title: '作品管理', url: '/manage/illusts/'},
  58. {title: 'ブックマーク', url: '/bookmark.php'},
  59. {title: '非公開ブックマーク', url: '/bookmark.php?rest=hide'},
  60. {title: '閲覧履歴', url: '/history.php'},
  61. {title: 'しおり', url: '/novel/marker_all.php'},
  62. {title: '設定', url: '/setting_user.php'}
  63. ];
  64. const ul = document.createElement('ul');
  65. ul.id = 'additional_navigator';
  66. textArray.forEach(({title, url}) => {
  67. const a = document.createElement('a');
  68. const li = document.createElement('li');
  69. a.append(title);
  70. a.href = url;
  71. li.append(a);
  72. ul.append(li);
  73. });
  74. const wrapper = document.body.prepend(ul);
  75. }