pixiv快速打开原图&自动收藏&原图链接打包下载&图片预览

支持记录pixiv历史记录,快速打开pixiv图片原图,快速收藏图片(按照设定填充标签),快速获取页面所有显示图片原图链接,储存所有获取的链接并打包下载,鼠标悬停图片进行大图浏览(图片与gif),下载作者所有作品等

Verze ze dne 19. 07. 2023. Zobrazit nejnovější verzi.

  1. // ==UserScript==
  2. // @name pixiv快速打开原图&自动收藏&原图链接打包下载&图片预览
  3. // @description 支持记录pixiv历史记录,快速打开pixiv图片原图,快速收藏图片(按照设定填充标签),快速获取页面所有显示图片原图链接,储存所有获取的链接并打包下载,鼠标悬停图片进行大图浏览(图片与gif),下载作者所有作品等
  4. // @version 3.5.8
  5. // @namespace akari
  6. // @license MIT
  7. // @author Pikaqian
  8. // @match *://www.pixiv.net/*
  9. // @match *://www.pixivision.net/*
  10. // @icon data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADTLW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAwADEANv/bAEMAAwICAgICAwICAgMDAwMEBgQEBAQECAYGBQYJCAoKCQgJCQoMDwwKCw4LCQkNEQ0ODxAQERAKDBITEhATDxAQEP/bAEMBAwMDBAMECAQECBALCQsQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEP/AABEIAGQAZAMBIgACEQEDEQH/xAAdAAEAAgMBAQEBAAAAAAAAAAAABgcDBAUCAQgJ/8QALxAAAgEEAgEDAwMEAgMAAAAAAQIDAAQFEQYSIQcTMSJBURQVYSMycYEWMxdCkf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwD+qdKw3bXSWsz2MEU1wqMYo5ZDGjvrwGYKxUE/JCnX4PxXF47y6HM3M+HyOPnxGatP++wuSCWXQIlhcfTNEdjTr8HasEcMgCQUpSgUqI8/z17jDiMNa28yRZu7NrcX6XEUS2UYQuznvIjkkKVBj7MpIJGgayYTnnpn7bYPBc347N+0ySY+SCDKQyNbywdFkhcBiVdO8YZT5Hdd62KCVUrwZoV12lQdjobYeTXrYPxQfaUpQKVHOac7wvBbFLzKR3d1LLto7Oxi965kjUr7six7BZY1YM2vJ+lVDO6I3ft7iC7gS5tZ45oZVDJJGwZWB+CCPBFBkpSlBqZW/wD2vHz34srq89lC3sWsfeWT+FXY2f8AdVpyPneUzuR4libL0lz9yuXvlaS6lnhtLvj4UNu7kjYllULtfpJ7+50IKswq1qjudzHFeG30Gbzt8lnNm7u0wtsW7M1xcSSEQxIigkkl3JIHhVZjpVJAduyiuoYPbvLlZ5AzakCddrvxsfkDQ/nW/G9Vw+YcztOLC0tTE097kTKttEpHj207NI43sRglFLAHTSRj/wBhWDnuWykHGRc8dMMoupUhlm911Mdu4PaSNkB+oeNeQPO9jxVYCFA5kO2dpJJSzEkl313bz92KqSfuQN/FBuZjI3WeZP3aQXSRSGSFZkRvbJO/B6j48f8AwVr7P5PivlKDXyOOssw1ucvbJfi0mS4t1uh7qwzISUkRW2EddnTAAj81PvTfldpcR5PHZHPSTT21yqqtywAhQQQj21bQ2PIfZJJMh8+NCE1iOAuc/eW9ljLXtflna3lLyRLEehDM0sasY9ptdked9fvQX3UJ9TvUUcDsrX9HaR32RvZ0ihtGcqzqWCkjQPwSPnxUqxGOXEYy3xwl90W6de/tqnb+eqgAf4AqrubZbD8g5D79pioHmxXu2IyPuq7MOymSNAu9KHXR2QQ0ZHXWiQ4l7krr9M19nMlJctDH2lnmYeAB5PgAAf4A/NWd6YcdHFeDY3ECExE+9ePE0AiaN7iZ52RlBIDKZSCd+SCfvUQ4HwqPlccHIuU4+aG3s70y2eOnV0JlhaRVll03SVDtXRCrKGRHDEhSts0ClKUCohzzk3p1jHtMDzzP4zFvkLe6uLWW9uUt+iRhIZXjlYgIwF0ibBDf1Tr71L6r7kfo7x/L3fK8jYQiwvOY4uPEX89oVgljXcoe6jkCMRcBJvDEHZhiB0BsBsc/vZcJ6cj/AIPZ482QhhhiWEhLeKx0AzRlPCqI/wC3r4+NVXWPvbDI2UN7jLyG7tZVBimhlEiOv5DAkGrmzHFMJnOOnit5atFjTHFEIbWVoOiRlSiq0ZBUDqBoaGvHx4qn/wDx9Z+mcp41i7q4uMcY47i2aa2VGBZesveVQBNK8qvM7aDbmG/kGg9UpSgVmsr26xt3Hf2bMJoSSoDlQ2xrR+xHn71hrBFdG5l6WUD3KqJDNJGy9YQjdCW2QT9f06UE7P4BICx+b8tNrgLKyt0Juc9FJEWhm6Nbx+0e8ynR2VZo1A8Hbg/Y1EeP41eQ5tMa9xasxH6i4ikkIkeAMA5UDz8sBv4G/wDFQrg1rl0w4veQQTwX8807GKW/N0UjMzso2YowpPbZVV0N6BIAq7vTzH28OG/cVVGkunYdwdnqp69f48g+KCS2lpa2FrFZWVvHBBAoSONF0qqPgAVmpSgUpSgVB+fZvI8MnvueXl5OnGcFxjKXuRjjAOpYfalRwPkt7az614/P2qcVy+UJgpeN5WLlDxLhpLKZMgZXKILYoRJ2YEFR1J2QRqgyces8ljsBjcfmckcjkLazhhurwoFNzMqAPL1HgdmBbQ/NcPnfGJ86LbIRX0kaY+C47QquxIWCFW/O19vWh8hj/FSsfFCARo0H5yj5PaPgpORSY/JW9nDYDIyG4s3iZYSASSGA/t7DsRtVAJJABI88T5Rb8pwmPzMcAtxkbZbmFDKre4hSOTsnwWQxzQOG0PEqbCttRb/P8ziuK29pm4eKw5jNQE22ORUjWWFZdCQ+43mKLQBcj5CgaJ0KgWZyF/ns2cxf3J6Rwfp7a0VVEVuCduwIUMzPpASxIAjXqq7YsGlNC9yDCuRNkQFlDrEZGfq6kxgfA7KGXZI1vYrVwNquMa/ubXHGxfISMHjluBdGODX/AFRyFVKISFYr52V2T5rfpQKkPpjZ5iwzcwwyxfs11LJNkUdyRHOUXTxj4DHS9l8Dz2+d75XHMPecqyX6XHNF+ktZgmQnLEGNSjHrH9JVpO3TanQAYk+QFNw4+wt8ZZxWNquo4lCjwAT/ACdeNn5NBs0pSgUpSgVFPVnFZvO+lnMcHxm2juMxkMBkLXHwysFSS5kt3WJWJ8AFyoJqV1oZ22zN5ibi24/lbfG5B1Agup7U3McZ2NkxB07eNjXYfO6DZtLmO8tYbuJJUSeNZFWWJo3AYbAZGAZT58ggEHwRWauXaZQwS2uKzNzajJ3JlMcUBZg6ITpvI2Pp6k78bJAJ+a0eN5rJZ7LZi9Rov2KB47PHkJ9c8sff9RMGDeYyzJGo6g7hdtsrroIZ6jKbjlccsiyqLW1Ecf8AUPRux2T1+NjQG6j1dLmMEo5zlrw3Ylhlito0jEaARlFPYdh9TE7B+r4+1c2gUpSgmfo+yWdpl8PHYLbxx3rXkbiZpDP731O5BUBPr7AKCfAB8b1Vh1UXDLq4teWY72LdpVuPdtpmNyyLFGUL9/bB6yN3jjUbGwGbRGyDbtApSlApSlArVylrc32NurKzyM2PuJ4Xiiu4URpLd2UgSKsishZSdgMpXY8gjxW1Sgg7cbg4jgl4/gbm6uMtnJ2SbI3U4kupHcD3bh2Lox6qPAj/ALNJ1XquhL8dj7XF2FvjbKMRwW0axRqPsoGhWcqpYMVBK/B15FeqCqOWcVlwF415FcQvZ3kjOiBCro5JLbO9MCT8+P8AfzXAqa+qhuWnxCwzIIkaZp0O+x2oCkfb53UKoFKUoMdxnG4xbzckTHZLIHFRte/o8ZAZ7u59sF/ahiBBkkfXVU2OxIGxur6qih81a3DOUwcrxs1xHG6T2NwbO5Vo2VfdCK/0k/3Aq6nY2Nkj5BoO/SlKBSlKBSlKBSlKCkOV8kvsp6ncg47cxQC2wltYm2dVIkPvo7OGJOiNqNaA/wB1gpSgUpSg+68bqbel7SRTZK3WT+jJ7c3t9FAEmtM2wOxJAUHZPhRrXnalBP6UpQKUpQf/2Q==
  11. // @grant GM_setClipboard
  12. // @grant GM_xmlhttpRequest
  13. // @grant GM_setValue
  14. // @grant GM_getValue
  15. // @grant GM_addValueChangeListener
  16. // @grant GM_listValues
  17. // @grant GM_deleteValue
  18. // @grant GM_download
  19. // @require https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js
  20. // ==/UserScript==
  21.  
  22. (function() {
  23. 'use strict';
  24.  
  25. //tagCookie修改部分!!!请在``中输入标签内容;
  26. //输入“锁定锁定”
  27. var tagSave=`锁定锁定`//←←隐私
  28. var tagSaveSafe=`锁定锁定`//←←公开
  29. var tagProhibit=`锁定锁定`//←←屏蔽
  30.  
  31. /* window.addEventListener('keydown',function(e){
  32. if(e.keyCode==68){
  33. GM_setValue('tagProhibit','风景,風景');
  34. tagProhibit=GM_getValue('tagProhibit');
  35. }
  36. }) */
  37.  
  38. if((tagSave!=GM_getValue('tagSave')&&tagSave!='锁定锁定')||(tagSaveSafe!=GM_getValue('tagSaveSafe')&&tagSaveSafe!='锁定锁定')||(tagProhibit!=GM_getValue('tagProhibit')&&tagProhibit!='锁定锁定')){
  39. if(tagSave!=GM_getValue('tagSave')&&tagSave!='锁定锁定'){
  40. GM_setValue('tagSave',tagSave)
  41. }
  42. if(tagSaveSafe!=GM_getValue('tagSaveSafe')&&tagSaveSafe!='锁定锁定'){
  43. GM_setValue('tagSaveSafe',tagSaveSafe)
  44. }
  45. if(tagProhibit!=GM_getValue('tagProhibit')&&tagProhibit!='锁定锁定'){
  46. GM_setValue('tagProhibit',tagProhibit)
  47. }
  48. }
  49.  
  50. var match_rules=[
  51. /([_=:;&\-\/\.\?\d\w]+?illust_id=(\d+)(?:&|$|))/,
  52. /(http(?:s|):\/\/[_\-\/\.\d\w]+?\/(\d{4,})_p\d{1,4}[_\-\/\.\d\w]*)/
  53. ];
  54. let style = document.createElement('style'),rightButton,centerWrap,number=1,elem,deleteCookie,deleteAll,alert_count=0,morefunction,No1,No2,No3,No4,No5,visual_check="",No8,allBookmark=[],isProhibit
  55. var svg_re="M1023.914667 315.733333h10.325333l-3.754667 105.130667h-12.202666c-62.890667 0-128.597333 22.528-146.432 109.824V832h-117.333334V325.12h117.333334v91.050667C901.888 332.629333 964.778667 315.733333 1023.914667 315.733333z"
  56. var svg_cat="M851.633231 841.386667C696.753231 841.386667 606.641231 784.128 606.641231 578.56S696.753231 315.733333 851.633231 315.733333c52.565333 0 100.437333 6.570667 131.413333 16.896V433.066667c-36.608-14.08-74.154667-19.712-119.210667-19.712-97.621333 0-136.106667 36.608-136.106666 166.144 0 127.658667 37.546667 163.328 137.984 163.328 42.24 0 84.48-5.632 121.088-19.712v99.498666c-29.098667 9.386667-87.296 18.773333-135.168 18.773334z"
  57. var svg_moe="M859.989333 315.733333c116.394667 0 168.021333 58.197333 168.021334 175.530667V832h-117.333334V517.546667c0-71.338667-19.712-104.192-83.541333-104.192-56.32 0-93.866667 18.773333-108.885333 78.848V832h-117.333334V517.546667c0-71.338667-18.773333-104.192-81.664-104.192-56.32 0-91.050667 16.896-107.008 76.032V832h-117.333333V325.12h117.333333v60.074667C441.344 335.445333 488.277333 315.733333 555.861333 315.733333c78.848 0 122.965333 26.282667 145.493334 75.093334C730.453333 335.445333 789.589333 315.733333 859.989333 315.733333z"
  58. var same_img="", isChangingSrc=0
  59.  
  60. document.body.appendChild(style);
  61. style.textContent=`
  62. #rightButton{
  63. height:21px;
  64. width:21px;
  65. border-bottom-right-radius:21px;
  66. border-top-right-radius:21px;
  67. color:#fff;
  68. padding:6px;
  69. opacity:.20;
  70. left:-20px;
  71. cursor:pointer;
  72. transform-origin:0px 17px;
  73. transition: 0.2s
  74. }
  75.  
  76.  
  77. #rightButton{
  78. position:fixed;
  79. z-index:10;
  80. font-size:14px}
  81.  
  82.  
  83. #rightButton{top:38%;background:#000}
  84. #deleteCookie{
  85. height:21px;
  86. width:21px;
  87. border-bottom-right-radius:21px;
  88. border-top-right-radius:21px;
  89. color:#fff;
  90. padding:6px;
  91. opacity:.20;
  92. left:-20px;
  93. cursor:pointer
  94. }
  95.  
  96.  
  97. #deleteCookie{
  98. position:fixed;
  99. z-index:10;
  100. font-size:14px;
  101. transform-origin:0px 17px;
  102. transition: 0.2s}
  103.  
  104.  
  105. #deleteCookie{top:45%;background:#000}
  106.  
  107. #deleteAll{
  108. height:21px;
  109. width:21px;
  110. border-bottom-right-radius:21px;
  111. border-top-right-radius:21px;
  112. color:#fff;
  113. padding:6px;
  114. opacity:.20;
  115. left:-20px;
  116. cursor:pointer;
  117. transform-origin:0px 17px;
  118. transition: 0.2s
  119. }
  120.  
  121.  
  122. #deleteAll{
  123. position:fixed;
  124. z-index:10;
  125. font-size:14px}
  126.  
  127.  
  128. #deleteAll{top:57%;background:#f00}
  129. #morefunction{
  130. height:21px;
  131. width:21px;
  132. border-bottom-right-radius:21px;
  133. border-top-right-radius:21px;
  134. color:#fff;
  135. padding:6px;
  136. opacity:.20;
  137. left:-20px;
  138. cursor:pointer;
  139. transform-origin:0px 17px;
  140. transition: 0.2s
  141. }
  142.  
  143.  
  144. #morefunction{
  145. position:fixed;
  146. z-index:11;
  147. font-size:14px}
  148.  
  149.  
  150. #morefunction{top:52%;background:#000}
  151.  
  152. .No{
  153. height:14px;
  154. width:14px;
  155. border-radius:21px;
  156. color:#fff;
  157. padding:6px;
  158. opacity:.0;
  159. left:-20px;
  160. cursor:pointer;
  161. position:fixed;
  162. z-index:10;
  163. font-size:14px;
  164. top:52%;
  165. background:#000;
  166. transition: 0.4s;
  167. transform-origin: 7px 40%;
  168. }
  169.  
  170. #No1{
  171. height:14px;
  172. width:14px;
  173. border-radius:21px;
  174. color:#fff;
  175. padding:6px;
  176. opacity:.0;
  177. left:-20px;
  178. cursor:pointer;
  179. position:fixed;
  180. z-index:10;
  181. font-size:14px;
  182. top:52%;
  183. transition: 0.4s;
  184. background:#f00;
  185. transform-origin: 7px 40%;
  186. }
  187.  
  188.  
  189.  
  190. #text{
  191. top:0%;
  192. background:#fff;
  193. color:black;
  194. opacity:.0;
  195. position:fixed;
  196. overflow:auto;
  197. z-index:3;
  198. left:-350px;
  199. width:280px;
  200. height:100%;
  201. border-radius:0px;
  202. transform-origin:-160px 0px;
  203. font-size:15px;
  204. padding-left:40px;
  205. padding-top:58px;
  206. line-height:30px;
  207. transition: 0.5s;
  208. }::-webkit-scrollbar{width:5px;}::-webkit-scrollbar-thumb{background:rgba(117,117,117,0.7);}
  209.  
  210.  
  211. #blackcover{
  212. top:0%;
  213. background:#000;
  214. color:black;
  215. opacity:.0;
  216. position:fixed;
  217. overflow:auto;
  218. z-index:1;
  219. left:0px;
  220. width:100%;
  221. height:100%;
  222. transform-origin:0px 0px;
  223. display:none;
  224. transition: 0.5s
  225. }
  226. #covertitle{
  227. top:0%;
  228. background:none;
  229. color:black;
  230. opacity:.0;
  231. position:fixed;
  232. overflow:auto;
  233. z-index:5;
  234. left:-360px;
  235. width:150x;
  236. height:36px;
  237. transform-origin:-160px 0px;
  238. padding-top:27px;
  239. padding-right:130px;
  240. font-size:20px;
  241. transition: 0.5s
  242. }
  243.  
  244. #pagenumber{
  245. top:34.7px;
  246. background:none;
  247. color:#606060;
  248. opacity:.0;
  249. position:fixed;
  250. z-index:5;
  251. left:-200px;
  252. width:50x;
  253. height:30px;
  254. font-weight:551;
  255. transform-origin:-160px 0px;
  256. font-size:10px;
  257. transition: 0.5s
  258. }
  259.  
  260. #bigeye{
  261. height:37px;
  262. width:37px;
  263. color:#fff;
  264. opacity:.0;
  265. left:-154px;
  266. padding-top:25px;
  267. transition: 0.5s
  268. }
  269.  
  270. #bigeye{
  271. position:fixed;
  272. z-index:4;}
  273.  
  274. #bigeye{top:0px;background:none}
  275. #whitecover{
  276. height:65px;
  277. width:320px;
  278. box-shadow:0px 0px 60px #fff;
  279. opacity:.0;
  280. left:-300px;
  281. transition: 0.5s
  282. }
  283.  
  284. #whitecover{
  285. position:fixed;
  286. z-index:3;}
  287.  
  288. #whitecover{top:0px;background:#fff}
  289.  
  290. #pages{
  291. top:32px;
  292. height:15px;
  293. width:15px;
  294. opacity:.0;
  295. left:-200px;
  296. position:fixed;
  297. z-index:5;
  298. transition: 0.5s
  299. }
  300.  
  301. #bigImg{
  302. position:absolute;
  303. transform-origin:-160px 0px;
  304. opacity:1;
  305. transition: 0.3s;
  306. z-index: 2;
  307. }
  308. #bigImg_1{
  309. position:absolute;
  310. opacity:1;
  311. z-index: 2;
  312. }
  313.  
  314.  
  315.  
  316. #slider{
  317. width:140px;
  318. outline:none;
  319. border-radius:3px;
  320. left:10px;
  321. top:72%;
  322. position:fixed;
  323. -webkit-appearance:button;
  324. cursor: pointer;
  325. transition: 0.3s;
  326. opacity:0;
  327. }
  328.  
  329. #slider_box{
  330. width: 23px;
  331. text-align: center;
  332. font-size: 13px;
  333. line-height: 23px;
  334. height: 23px;
  335. left: 10px;
  336. top: 74.6%;
  337. position: fixed;
  338. border-radius: 6px;
  339. cursor: pointer;
  340. background-color: #cbcbcb;
  341. opacity:0;
  342. transition: 0.3s;
  343. }
  344.  
  345.  
  346.  
  347. #path14{
  348. transition:0.3s
  349. }
  350. #explodeFinish{
  351. position: fixed;
  352. bottom: 10px;
  353. left: 10px;
  354. font-size: 17px;
  355. background-color: black;
  356. color: white;
  357. padding-top: 8px;
  358. padding-bottom: 8px;
  359. padding-left: 12px;
  360. padding-right: 12px;
  361. border-radius: 10px;
  362. opacity: 0;
  363. transition: 0.2s
  364. }
  365. #insideText{
  366. cursor:pointer
  367. }
  368. #visual_img{
  369. position:fixed;
  370. z-index:10000;
  371. width:150px;
  372. }
  373.  
  374.  
  375. #add{
  376. top: 31.2%;
  377. left: 86.8%;
  378. position: absolute;
  379. background-color: white;
  380. border-radius: 16px;
  381. transition: 0.2s;
  382. }
  383. #add_text_all{
  384. position: absolute;
  385. top: 32.5%;
  386. left: 89%;
  387. width: 63px;
  388. height: 108px;
  389. display: flex;
  390. flex-direction: column;
  391. }
  392. .add_text{
  393. height: 25%;
  394. font-size: 13px;
  395. font-weight: 550;
  396. position: relative;
  397. transition: 0.2s;
  398. opacity: 0;
  399. cursor: pointer;
  400. z-index: 1;
  401. }
  402. #add_cover{
  403. top: 31.2%;
  404. left: 86.8%;
  405. width:32px;
  406. height:32px;
  407. position: absolute;
  408. background-color: white;
  409. border-radius: 16px;
  410. cursor:pointer;
  411. transition: 0.2s;
  412. opacity:0;
  413. z-index:1;
  414. }
  415.  
  416.  
  417.  
  418. #check{
  419. border-radius: 20px;
  420. height: 24px;
  421. position: fixed;
  422. top: 165px;
  423. width: 118px;
  424. left: 16px;
  425. outline: 0;
  426. border: none;
  427. background-color: #000;
  428. opacity: 0;
  429. transition: 0.2s;
  430. }
  431. #checkInput{
  432. border: none;
  433. width: 85px;
  434. height: 15px;
  435. left: 32px;
  436. top: 169px;
  437. position: fixed;
  438. background-color: #000000;
  439. color: white;
  440. cursor: text;
  441. font-weight:550;
  442. opacity:0;
  443. transition: 0.2s;
  444. }
  445. #checkInput:focus{
  446. outline:0;
  447. }
  448.  
  449.  
  450.  
  451. #tag_view_out{
  452. opacity: 0;
  453. border-radius: 10px;
  454. width: 300px;
  455. height: 140px;
  456. position: fixed;
  457. top: 264px;
  458. left: 152px;
  459. z-index: 100;
  460. font-size: 17px;
  461. padding: 13px;
  462. overflow: hidden;
  463. transition: 0.3s;
  464. }
  465.  
  466. #tag_view_text{
  467. left: 5px;
  468. top: -3px;
  469. position: relative;
  470. border:0;
  471. outline:none;
  472. width: 281px;
  473. height: 130px;
  474. transition: 0.3s;
  475. font-Weight:551;
  476. resize: none;
  477. }
  478.  
  479. #help{
  480. cursor: pointer;
  481. left: 293px;
  482. position: relative;
  483. top: -6px;
  484. }
  485.  
  486. #spin{
  487. cursor: pointer;
  488. left: 277px;
  489. position: relative;
  490. top: -30px;
  491. transform: rotate(0deg);
  492. transform-origin: 8px 8px;
  493. transition: 0.5s;
  494. }
  495.  
  496. title{
  497. display:block;
  498. }
  499.  
  500. .lock_svg{
  501. cursor: pointer;
  502. left: 295px;
  503. position: relative;
  504. top: -77px;
  505. }
  506.  
  507. #trash{
  508. cursor: pointer;
  509. left: 295px;
  510. position: relative;
  511. top: -126px;
  512. }
  513. #userImgBack{
  514. width: 100%;
  515. height: 60%;
  516. position: fixed;
  517. top: 40%;
  518. background-color: #000;
  519. opacity:1;
  520. overflow: auto;
  521. justify-content: center;
  522. display: flex;
  523. z-index: 2;
  524. }
  525. #userImgUl{
  526. display:flex;
  527. flex-wrap: wrap;
  528. justify-content: center;
  529. top: 20px;
  530. position: relative;
  531. z-index: 2;
  532. }
  533. .userImgAll{
  534. width: 180px;
  535. height: 210px;
  536. background-color: none;
  537. margin: 29px;
  538. display: flex;
  539. flex-wrap: wrap;
  540. align-content: center;
  541. z-index: 2;
  542. }
  543. .userImgPic{
  544. width: 180px;
  545. height: 180px;
  546. position: relative;
  547. cursor: pointer;
  548. border-radius: 8px;
  549. z-index: 2;
  550. }
  551. .userImgText{
  552. white-space: nowrap;
  553. color: #fff;
  554. overflow: hidden;
  555. cursor: pointer;
  556. top: 12px;
  557. position: relative;
  558. z-index: 2;
  559. }
  560. #userImgTitle{
  561. position: fixed;
  562. width: 100px;
  563. height: 30px;
  564. display: flex;
  565. top: 42%;
  566. font-size: 20px;
  567. font-weight: 550;
  568. color: #fff;
  569. justify-content: center;
  570. z-index: 2;
  571. }
  572. #userImgTitleBackground{
  573. background-color: #000;
  574. position: fixed;
  575. width: 100%;
  576. height: 63px;
  577. z-index: 2;
  578. opacity: 0.75;
  579. }
  580. #userImgCross{
  581. position: fixed;
  582. z-index: 2;
  583. right: 30px;
  584. top: 42%;
  585. cursor: pointer;
  586. }
  587.  
  588. .userPageAll{
  589. position: relative;
  590. top: 22px;
  591. left: 141px;
  592. background-color: black;
  593. opacity: 0.55;
  594. width: 32px;
  595. height: 18px;
  596. z-index: 3;
  597. border-radius: 16px;
  598. }
  599. .userImgR18{
  600. color: white;
  601. background-color: red;
  602. height: 16px;
  603. line-height: 16px;
  604. padding: 0px 6px;
  605. border-radius: 5px;
  606. text-align: center;
  607. font-size: 10px;
  608. font-weight: 550;
  609. display: flex;
  610. align-content: center;
  611. justify-content: flex-end;
  612. position: relative;
  613. top: 23px;
  614. left: 7px;
  615. z-index: 3;
  616. }
  617.  
  618. #userImgPageSvg{
  619. z-index: 3;
  620. stroke: none;
  621. fill: currentcolor;
  622. width: 9px;
  623. line-height: 0;
  624. font-size: 0px;
  625. vertical-align: middle;
  626. position: relative;
  627. left: 5px;
  628. top: 4px;
  629. }
  630.  
  631. .userPageText{
  632. color: white;
  633. font-size: 10px;
  634. font-weight: 550;
  635. display: flex;
  636. align-content: center;
  637. justify-content: flex-end;
  638. position: relative;
  639. top: -20px;
  640. left: -6px;
  641. }
  642.  
  643. #user_svg{
  644. position: relative;
  645. top: -53px;
  646. left: 80px;
  647. z-index: 1;
  648. cursor: pointer;
  649. opacity: 0.5;
  650. }
  651. #user_svg_background{
  652. width: 20px;
  653. height: 20px;
  654. opacity: 0;
  655. z-index: 2;
  656. position: relative;
  657. top: -73px;
  658. left: 80px;
  659. cursor: pointer;
  660. }
  661. .history_textOut{
  662. display: flex;
  663. flex-direction: row;
  664. height: 20%;
  665. width: 100%;
  666. transform: translateY(30px);
  667. align-items: center;
  668. }
  669. .history_img{
  670. position: relative;
  671. height: 65%;
  672. left: 65px;
  673. }
  674. .history_title{
  675. transform: translateX(120px);
  676. width: 380px;
  677. font-weight: 550;
  678. cursor:pointer;
  679. }
  680.  
  681. #history_all{
  682. position: fixed;
  683. width: 50%;
  684. height: 85%;
  685. top: 7.5%;
  686. left: 25%;
  687. background-color: #f5f5f5;
  688. border-radius: 6px;
  689. transform-origin: -340px 245px;
  690. transform: scale(0.01);
  691. transition: 0.5s;
  692. }
  693. #history_bigTitle{
  694. height: 9%;
  695. width: 100%;
  696. position: absolute;
  697. background-color: #d1d1d17d;
  698. display: flex;
  699. justify-content: center;
  700. align-items: center;
  701. border-top-left-radius: 6px;
  702. border-top-right-radius: 6px;
  703. }
  704. #history_bigTitleText{
  705. cursor: default;
  706. color: #000;
  707. opacity: 0.6;
  708. text-align: center;
  709. font-size: 22px;
  710. font-weight: 550;
  711. }
  712. #history_back{
  713. overflow: auto;
  714. position: relative;
  715. background-color: #f5f5f5;
  716. width: 100%;
  717. height: 81%;
  718. top: 9%;
  719. display: flex;
  720. flex-direction: column;
  721. align-items: flex-start;
  722. border-radius: 6px;
  723. }
  724. .history_date{
  725. display: flex;
  726. justify-content: center;
  727. padding-top: 5%;
  728. padding-bottom: 2%;
  729. font-size: 20px;
  730. font-weight: 550;
  731. height: 20%;
  732. width: 100%;
  733. transform: translateY(30px);
  734. cursor: default;
  735. }
  736. #history_pageBack{
  737. top: 91%;
  738. height: 9%;
  739. width: 100%;
  740. position: absolute;
  741. background-color: #d1d1d17d;
  742. display: flex;
  743. justify-content: center;
  744. align-items: center;
  745. border-bottom-left-radius: 6px;
  746. border-bottom-right-radius: 6px;
  747. }
  748. .history_page{
  749. padding-left: 1px;
  750. padding-right: 1px;
  751. cursor: pointer;
  752. }
  753. #history_pageNum{
  754. cursor: pointer;
  755. font-size: 16px;
  756. font-weight: 550;
  757. opacity: 0.7;
  758. }
  759. #history_close{
  760. position: fixed;
  761. left: 91%;
  762. transition: all 0.25s ease 0s;
  763. cursor: pointer;
  764. }
  765. #history_clear{
  766. position: fixed;
  767. left: 83%;
  768. transition: all 0.25s ease 0s;
  769. cursor: pointer;
  770. }
  771. #history_visible{
  772. position: fixed;
  773. left: 75%;
  774. transition: all 0.25s ease 0s;
  775. cursor: pointer;
  776. }
  777. #history_delete{
  778. left: 140px;
  779. position: relative;
  780. cursor: pointer;
  781. opacity: 0;
  782. transition: 0.2s;
  783. }
  784. #history_R18{
  785. opacity: 1;
  786. background-color: rgb(255, 255, 255, 0);
  787. left: 20%;
  788. position: fixed;
  789. }
  790. #sort_ul{
  791. gap: 24px;
  792. position: relative;
  793. left: -3%;
  794. display: flex;
  795. flex-wrap: wrap;
  796. width: 1224px;
  797. }
  798. .sort_img{
  799. width: 184px;
  800. border-radius: 7px;
  801. }
  802. .sort_text_div{
  803. width: 184px;
  804. display: flex;
  805. flex-direction: column;
  806. position: relative;
  807. top: 6px;
  808. }
  809. .sort_li{
  810. display: flex;
  811. flex-direction: column;
  812. }
  813. .sort_img_name{
  814. text-overflow: ellipsis;
  815. white-space: nowrap;
  816. overflow: hidden;
  817. font-weight: 550;
  818. }
  819. .sort_author_name{
  820. position: relative;
  821. top: -5px;
  822. }
  823. .sort_R18{
  824. padding: 0px 6px;
  825. border-radius: 3px;
  826. color: rgb(255, 255, 255);
  827. background: rgb(255, 64, 96);
  828. font-weight: bold;
  829. font-size: 10px;
  830. line-height: 16px;
  831. user-select: none;
  832. }
  833. .sort_page{
  834. }
  835. .sort_up{
  836. position: absolute;
  837. width: 184px;
  838. display: flex;
  839. justify-content: space-between;
  840. flex-direction: row-reverse;
  841. }
  842. #sort_page_path{
  843. transform: scale(1.1) translate(0px, 3px);
  844. }
  845. .sort_page_number{
  846. transform: translate(0px, 3px);
  847. }
  848. .sort_R18{
  849. padding: 0px 6px;
  850. border-radius: 3px;
  851. color: rgb(255, 255, 255);
  852. background: rgb(255, 64, 96);
  853. font-weight: bold;
  854. font-size: 10px;
  855. line-height: 16px;
  856. user-select: none;
  857. }
  858. #sort_more_out{
  859. display: flex;
  860. justify-content: center;
  861. margin: 40px auto 0px;
  862. padding: 0px 0px 64px;
  863. }
  864. #sort_more_background{
  865. cursor: pointer;
  866. background-color: black;
  867. color: white;
  868. width: 350px;
  869. height: 40px;
  870. border-radius: 20px;
  871. display: flex;
  872. justify-content: center;
  873. align-items: center;
  874. }
  875. #sort_more_text{
  876. font-weight: 550;
  877. font-size: 19px;
  878. }
  879. .sort_down{
  880. border-radius: 5px;
  881. background-color: rgba(255,255,255,1);
  882. position: absolute;
  883. transform: translate(5px, -23px);
  884. }
  885. .sort_bookmark{
  886. margin-left: 6px;
  887. margin-right: 6px;
  888. font-weight: 550;
  889. }
  890. .sort_love_button{
  891. background: none;
  892. border: none;
  893. width: 40px;
  894. height: 40px;
  895. position: relative;
  896. top: -86px;
  897. left: 145px;
  898. cursor: pointer;
  899. }
  900. .sort_gif{
  901. width: 48px;
  902. height: 48px;
  903. transform: translate(-115px, 70px);
  904. position: absolute;
  905. stroke: none;
  906. line-height: 0;
  907. font-size: 0px;
  908. vertical-align: middle;
  909. }
  910. .sort_gif_circle{
  911. fill: rgba(0, 0, 0, 0.32);
  912. transform: scale(2);
  913. }
  914. .sort_gif_path{
  915. fill: rgb(255, 255, 255);
  916. transform: scale(2);
  917. }
  918. #load_count_div{
  919. display: flex;
  920. position: fixed;
  921. height: 34px;
  922. top: 95%;
  923. left: 2%;
  924. background-color: rgba(0,0,0,0.2);
  925. align-items: center;
  926. justify-content: center;
  927. border-radius: 20px;
  928. transition: 0.5s;
  929. }
  930. #load_count_text{
  931. font-size: 20px;
  932. font-weight: 550;
  933. color: black;
  934. margin-left: 20px;
  935. margin-right: 20px;
  936. }
  937. #sort_out_div{
  938. display: flex;
  939. width: 162px;
  940. height: 30px;
  941. position: fixed;
  942. top: 670px;
  943. left: 20px;
  944. background-color: rgba(0,0,0,0.2);
  945. border-radius: 15px;
  946. align-items: center;
  947. justify-content: space-around;
  948. }
  949. .sort_input{
  950. outline: none;
  951. border: 0;
  952. font-size: 15px;
  953. font-weight: 550;
  954. width: 30px;
  955. height: 20px;
  956. border-radius: 4px;
  957. position: relative;
  958. background-color: unset;
  959. text-align: center;
  960. }
  961. #sort_input_text{
  962. font-weight: 550;
  963. position: relative;
  964. left: 2px;
  965. }
  966. #sort_start{
  967. width: 1em;
  968. height: 1em;
  969. vertical-align: middle;
  970. fill: currentColor;
  971. overflow: hidden;
  972. position: relative;
  973. left: -6px;
  974. transform: scale(1.6);
  975. cursor: pointer;
  976. top: -1px;
  977. }
  978.  
  979. #userImgGif{
  980. position: relative;
  981. top: -83px;
  982. left: 78px;
  983. z-index: 3;
  984. transform: scale(2);
  985. }
  986.  
  987. #loveTagView{
  988. position: fixed;
  989. left: 1%;
  990. bottom: 5%;
  991. background-color: black;
  992. width: 9%;
  993. height: auto;
  994. border-radius: 5px;
  995. color: white;
  996. display: flex;
  997. padding: 6px;
  998. opacity: 0;
  999. transition: 0.5s;
  1000. }
  1001. `;
  1002.  
  1003. //初始化、预设各个cookie
  1004. if(getCookie("slider")==""){
  1005. setCookie("slider",1,90)
  1006. }
  1007. if(getCookie("preImg")==""){
  1008. setCookie("preImg",0,90)
  1009. }
  1010. if(getCookie("R-18_block")==""){
  1011. setCookie("R-18_block",0,90)
  1012. }
  1013. if(getCookie("aside")==""){
  1014. setCookie("aside","2,false",90)
  1015. }
  1016. if(getCookie("tagCookie")==""){
  1017. setCookie("tagCookie","",90)
  1018. }
  1019. if(getCookie("tagCookieSafe")==""){
  1020. setCookie("tagCookieSafe","",90)
  1021. }
  1022. if(getCookie('tagCookieSetting')==''){
  1023. setCookie('tagCookieSetting',0,90)
  1024. }
  1025. if(getCookie('tagCookieType')==''){//0为使用cookie中的正则,1为使用代码中的正则,无法直接修改
  1026. setCookie('tagCookieType',0,90)
  1027. }
  1028. if(document.cookie.length<7000){
  1029. setCookie('Size',0,90)
  1030. }
  1031. if(document.cookie.length>=7000&&document.cookie.length<7650){
  1032. setCookie('Size',1,90)
  1033. }
  1034. if(document.cookie.length>=7650){
  1035. setCookie('Size',2,90)
  1036. }
  1037. if(getCookie('svgTitle')==''){//此cookie只能手动到F12修改
  1038. setCookie('svgTitle',1,90)//1为开启,0为关闭
  1039. }
  1040. if(getCookie('bigGif')==''){//动图预览
  1041. setCookie('bigGif',0,90)//1为开启,0为关闭
  1042. }
  1043. if(getCookie('history_R18')==''){//历史R-18显示
  1044. setCookie('history_R18',0,90)//0为隐藏,1为显示
  1045. }
  1046. if(getCookie('unfold')==''){//自动展开
  1047. setCookie('unfold',0,90)//0为关闭,1为打开
  1048. }
  1049. if(getCookie('singleSort')==''){//单页排序
  1050. setCookie('singleSort',0,90)//0为关闭,1为打开
  1051. }
  1052.  
  1053. setCookie("outUrl",2,90)//暂时强制设置为2(moe)
  1054.  
  1055.  
  1056.  
  1057. function pictureSize(element){
  1058. var mouseX=event.clientX
  1059. var mouseY=event.clientY
  1060. var wide=element.clientWidth
  1061. var hight=element.clientHeight
  1062. var pagewide=document.documentElement.clientWidth
  1063. var pagehight=document.documentElement.clientHeight
  1064. var w1=wide/pagewide
  1065. var h1=hight/pagehight
  1066. if(w1<=h1){
  1067. element.style.height=pagehight-mouseY+"px"
  1068. }
  1069. else{
  1070. element.style.width=pagewide-mouseX+"px"
  1071. }
  1072. event.preventDefault()
  1073. }
  1074. //————————————————————————————————删除cookie
  1075. function delCookie(name){
  1076. var date = new Date();
  1077. date.setTime(date.getTime() - 10000);
  1078. document.cookie = name + "=a; expires=" + date.toGMTString()+";path=/";
  1079. }
  1080. /*
  1081. function downloadIamge(imgsrc, name) {
  1082. let image = new Image();
  1083. image.setAttribute("crossOrigin", "anonymous");
  1084. image.onload = function() {
  1085. let canvas = document.createElement("canvas");
  1086. canvas.width = image.width;
  1087. canvas.height = image.height;
  1088. let context = canvas.getContext("2d");
  1089. context.drawImage(image, 0, 0, image.width, image.height);
  1090. let url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
  1091. let a = document.createElement("a"); // 生成一个a元素
  1092. let event = new MouseEvent("click"); // 创建一个单击事件
  1093. a.download = name || "photo"; // 设置图片名称
  1094. a.href = url;
  1095. a.dispatchEvent(event);
  1096. };
  1097. image.src = imgsrc;
  1098. event.preventDefault()
  1099. }
  1100. */
  1101. function downloadIamge(imgsrc, name){
  1102. if(name==''){
  1103. name='photo'
  1104. }
  1105. GM_download(imgsrc,name)
  1106. }
  1107. function download(filename, text) {
  1108. var element = document.createElement('a');
  1109. element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
  1110. element.setAttribute('download', filename);
  1111. element.style.display = 'none';
  1112. document.body.appendChild(element);
  1113. element.click();
  1114. document.body.removeChild(element);
  1115. }
  1116. function lastcookie(){
  1117. var matchrule=/pixivid/
  1118. var cookie_separate=document.cookie.split(";")
  1119. for(var r=0;r<cookie_separate.length;r++){
  1120. if(cookie_separate[r].match(/pixivid/)!=null){
  1121. var results=cookie_separate[r].match(/pixivid/)
  1122. var results_1=cookie_separate[r].split("=")[0].split("d")[1]
  1123. }
  1124. else{
  1125. continue
  1126. }
  1127. }
  1128. if(results==null){
  1129. return 0
  1130. }
  1131. else{
  1132. return parseInt(results_1)+1
  1133. }
  1134. }
  1135.  
  1136. function getelemt(findelement){
  1137. //——————————————————————————
  1138. var elem_1 = document.getElementsByTagName("svg");
  1139. for(var h=0;h<elem_1.length;h++){
  1140. var match_result=elem_1[h].id.match(findelement)
  1141. if(match_result!=null){
  1142. return elem_1[h]
  1143. break
  1144. }
  1145. }
  1146. //——————————————————————————
  1147. }
  1148. function retract(){
  1149. var cookie_retract=getCookie("pixiv_preurl")
  1150. var retract_num=lastcookie()
  1151. var new_cookieNum=-1
  1152. var new_cookieNum_1=1
  1153. if(cookie_retract.substr(cookie_retract.length-1,1)!=","){
  1154. new_cookieNum_1=0
  1155. }
  1156. for(var j=0;j<cookie_retract.split(",").length-new_cookieNum_1;j++){
  1157. if(j>0&&cookie_retract.split(",")[j].match(cookie_retract.split(",")[j-1].match(/\d{6,10}/)[0])!=null){
  1158. setCookie("pixivid"+new_cookieNum,getCookie("pixivid"+new_cookieNum)+","+cookie_retract.split(",")[j],-1)
  1159. }
  1160. else{
  1161. setCookie("pixivid"+(new_cookieNum+1),cookie_retract.split(",")[j],-1)
  1162. new_cookieNum++
  1163. }
  1164. retract_num++
  1165. }
  1166. delCookie("pixiv_preurl")
  1167. return 0
  1168. }
  1169. //————————————————————————————————————————————————核爆·用户页面图片下载
  1170. function user_savepicture(){
  1171. getFinalUrl(2,"-1",-1)
  1172. }
  1173. function visualImg(event){
  1174. if(event.target.localName.match(/text\d{1,3}/)!=null){
  1175. var offT=event.target.offsetTop
  1176. var offL=event.target.offsetLeft
  1177. var imgId=event.target.innerText
  1178. if(imgId.match("-")!=null){
  1179. window.open("https://pixiv.re/"+imgId+".png","block")
  1180. }
  1181. }
  1182. }
  1183. var visual_out=1
  1184. function visualPic(event){
  1185. if(event.target.localName.match(/text\d{1,3}/)!=null){
  1186. if(visual_out==1){
  1187. visual_out=0
  1188. if(document.getElementsByClassName("visual_img")!=null){
  1189. for(var re=0;re<document.getElementsByClassName("visual_img").length;re++){
  1190. document.getElementsByClassName("visual_img")[re].remove()
  1191. }
  1192. }
  1193. visual_check=event.target.localName.match(/text\d{1,3}/)[0]
  1194. var visual_page=event.target.innerText.split("-")[1]
  1195. var visual_pid=event.target.innerText.match(/\d{6,10}/)[0]
  1196. GM_xmlhttpRequest({
  1197. method: "GET",
  1198. url: "https://www.pixiv.net/artworks/"+visual_pid,
  1199. headers:{
  1200. "User-Agent": navigator.userAgent,
  1201. },
  1202. onload: function(res) {
  1203. if(res.status === 200){
  1204. //console.log('成功')
  1205. var p=res.responseText
  1206. var visual_url=p.substring(p.match('"thumb":"').index+9,p.match('","small":"').index)
  1207. if(event.target.innerText.match("-")!=null){
  1208. var visual_url_new=visual_url.split("_p0_")[0]+"_p"+(parseInt(visual_page)-1)+"_square1200.jpg"
  1209. }
  1210. else{
  1211. visual_url_new=visual_url.split("_p0_")[0]+"_p0_square1200.jpg"
  1212. }
  1213. var visual_img=document.createElement("img")
  1214. visual_img.id="visual_img"
  1215. visual_img.style.left="160px"
  1216. visual_img.style.top=(event.screenY-78)+"px"
  1217. visual_img.src=visual_url_new
  1218. visual_img.className="visual_img"
  1219. document.body.appendChild(visual_img)
  1220. }}})
  1221. }
  1222. }
  1223. else{
  1224. visual_out=1//移出id显示范围
  1225. var visual_remove=document.getElementsByClassName("visual_img")
  1226. if(visual_remove.length!=0){
  1227. for(re=0;re<visual_remove.length;re++){
  1228. visual_remove[re].remove()
  1229. }
  1230. }
  1231. }
  1232. }
  1233.  
  1234. function transform(className,transform){
  1235. var elements=document.getElementsByClassName(className)
  1236. for(var tr=0;tr<elements.length;tr++){
  1237. elements[tr].style.transform=transform
  1238. }
  1239. }
  1240.  
  1241. function focusOpacity(element){
  1242. element.onmouseleave=function(){
  1243. element.style.opacity='0.2'
  1244. }
  1245. element.onmouseenter=function(){
  1246. element.style.opacity='0.4'
  1247. }
  1248. }
  1249.  
  1250. function removeRepeatArrElement(arr){
  1251. var obj = {};
  1252. var newArr = [];
  1253. var len = arr.length;
  1254. for(var i=0; i<len; i++){
  1255. if(!obj[arr[i]]){
  1256. newArr.push(arr[i]);
  1257. obj[arr[i]] = true;
  1258. }
  1259. }
  1260. return newArr;
  1261. }
  1262.  
  1263. function loveTagView(tag){
  1264. var a=document.createElement('a')
  1265. a.id='loveTagView'
  1266. var tag_removed=removeRepeatArrElement(tag)
  1267. a.innerText=tag_removed
  1268. document.body.appendChild(a)
  1269. setTimeout(function(){
  1270. a.style.opacity=1
  1271. },250)
  1272. setTimeout(function(){
  1273. a.style.opacity=0
  1274. },1250)
  1275. setTimeout(function(){
  1276. a.remove()
  1277. },1750)
  1278. }
  1279. //————————————————————————————————————————————————
  1280. function addAllButton () {
  1281. var divNew=document.createElement("div")
  1282. divNew.setAttribute("id","divnew")
  1283. document.body.appendChild(divNew)
  1284.  
  1285.  
  1286. if(getCookie('svgTitle')==1){
  1287. var rightButton_title_text='下载全部链接'
  1288. var deleteCookie_title_text='历史记录'
  1289. var morefunction_title_text='更多功能'
  1290. var No1_title_text='清空链接'
  1291. var No2_title_text='核爆'
  1292. var No3_title_text='储存链接预览'
  1293. var No4_title_text='删除/回溯'
  1294. var No5_title_text='预览图'
  1295. var No6_title_text='链接打开上限'
  1296. var No7_title_text='R-18模糊'
  1297. var No8_title_text='代理网站切换'
  1298. var No9_title_text='标签查询'
  1299. var No10_title_text='自动添加标签'
  1300. var No11_title_text='作者作品下载'
  1301. var No12_title_text='搜索结果排序'
  1302. var No13_title_text='自动多图展开'
  1303. }
  1304. else{
  1305. rightButton_title_text=''
  1306. deleteCookie_title_text=''
  1307. morefunction_title_text=''
  1308. No1_title_text=''
  1309. No2_title_text=''
  1310. No3_title_text=''
  1311. No4_title_text=''
  1312. No5_title_text=''
  1313. No6_title_text=''
  1314. No7_title_text=''
  1315. No8_title_text=''
  1316. No9_title_text=''
  1317. No10_title_text=''
  1318. No11_title_text=''
  1319. No12_title_text=''
  1320. No13_title_text=''
  1321. }
  1322.  
  1323.  
  1324. rightButton = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1325. var path2 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1326. rightButton.setAttribute("aria-hidden","true");
  1327. rightButton.setAttribute('viewbox', '0 0 24 24');
  1328. rightButton.setAttribute('width', '24px');
  1329. rightButton.setAttribute('height', '24px');
  1330. path2.setAttribute('d','M 10 4 L 12 4 L 12 19 L 10 19 Z M 4 11 L 5 11 L 10 16 L 10 19 L 4 13 Z M 18 11 L 17 11 L 12 16 L 12 19 L 18 13 Z')
  1331. path2.setAttribute('fill', '#fff');
  1332. rightButton.appendChild(path2);
  1333. rightButton.id = 'rightButton';
  1334. var rightButton_title=document.createElement('div')
  1335. rightButton_title.id='rightButton_title'
  1336. rightButton_title.title=rightButton_title_text
  1337. document.getElementById('divnew').appendChild(rightButton_title)
  1338. document.getElementById("rightButton_title").appendChild(rightButton);
  1339.  
  1340. deleteCookie = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1341. var path3 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1342. deleteCookie.setAttribute("aria-hidden","true");
  1343. deleteCookie.setAttribute('viewbox', '0 0 24 24');
  1344. deleteCookie.setAttribute('width', '24px');
  1345. deleteCookie.setAttribute('height', '24px');
  1346. path3.setAttribute('d','M538.87104 32c-128 0-243.2 51.2-332.8 128L110.07104 57.6c-12.8-12.8-32-6.4-38.4 6.4L1.27104 422.4c-6.4 12.8 12.8 32 25.6 25.6l339.2-70.4c19.2-6.4 25.6-25.6 12.8-38.4L295.67104 256c64-57.6 147.2-96 243.2-96C737.27104 160 897.27104 320 897.27104 512s-160 352-358.4 352c-153.6 0-281.6-89.6-332.8-217.6l-115.2 57.6c76.8 172.8 249.6 294.4 448 294.4 268.8 0 486.4-217.6 486.4-480C1025.27104 249.6 807.67104 32 538.87104 32zM615.67104 300.8h-57.6c-12.8 0-25.6 12.8-25.6 32V512H353.27104c-19.2 0-32 12.8-32 25.6v51.2c0 12.8 12.8 25.6 32 25.6h262.4c6.4 0 12.8 0 19.2-6.4 0-6.4 6.4-12.8 6.4-19.2v-256c0-19.2-12.8-32-25.6-32z')
  1347. path3.setAttribute('fill', '#fff');
  1348. path3.style.transform="scale(0.018) translate(0px, 60px)"
  1349. deleteCookie.appendChild(path3);
  1350. deleteCookie.id = 'deleteCookie';
  1351. var deleteCookie_title=document.createElement('div')
  1352. deleteCookie_title.id='deleteCookie_title'
  1353. deleteCookie_title.title=deleteCookie_title_text
  1354. document.getElementById('divnew').appendChild(deleteCookie_title)
  1355. document.getElementById("deleteCookie_title").appendChild(deleteCookie);
  1356. morefunction = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1357. var path5 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1358. morefunction.setAttribute("aria-hidden","true");
  1359. morefunction.setAttribute('viewbox', '0 0 24 24');
  1360. morefunction.setAttribute('width', '24px');
  1361. morefunction.setAttribute('height', '24px');
  1362. path5.setAttribute('d','M 841.639 555.272 c 1.77544 -14.2014 3.10676 -28.626 3.10676 -43.2715 c 0 -14.6456 -1.33132 -29.0691 -3.10676 -43.2715 l 93.8658 -73.4499 c 8.43204 -6.65661 10.8737 -18.6395 5.32528 -28.4039 l -88.7616 -153.779 c -5.54734 -9.54233 -17.0872 -13.5363 -27.0726 -9.54233 l -110.509 44.6028 c -22.8566 -17.5303 -47.9317 -32.3979 -75.0032 -43.7156 L 622.841 86.8306 c -1.99749 -10.4295 -11.0957 -18.6395 -22.1904 -18.6395 l -177.523 0 c -11.0957 0 -20.1929 8.20999 -21.9683 18.6395 l -16.6431 117.61 c -27.0726 11.3167 -52.1477 25.9623 -75.0032 43.7156 l -110.508 -44.6028 c -9.98542 -3.77191 -21.5242 0 -27.0726 9.54233 l -88.7616 153.779 c -5.54734 9.54233 -3.10676 21.5242 5.32528 28.4039 l 93.6438 73.4499 c -1.77544 14.2014 -3.10676 28.626 -3.10676 43.2715 c 0 14.6456 1.33132 29.0691 3.10676 43.2715 l -93.6438 73.4499 c -8.43204 6.65661 -10.8737 18.6395 -5.32528 28.4039 l 88.7616 153.779 c 5.54734 9.54233 17.0861 13.5363 27.0726 9.54233 l 110.509 -44.6028 c 22.8566 17.5303 47.9317 32.3979 75.0032 43.7156 l 16.6431 117.61 c 1.77544 10.4295 10.8737 18.6395 21.9683 18.6395 l 177.523 0 c 11.0957 0 20.1929 -8.20999 21.9683 -18.6395 l 16.6431 -117.61 c 27.0726 -11.3167 52.1477 -25.9623 75.0032 -43.7156 l 110.508 44.6028 c 9.98542 3.77191 21.5252 0 27.0726 -9.54233 l 88.7616 -153.779 c 5.54734 -9.54233 3.10676 -21.5242 -5.32528 -28.4039 L 841.639 555.272 Z M 511.888 667.333 c -85.8769 0 -155.333 -69.4559 -155.333 -155.333 s 69.4559 -155.333 155.333 -155.333 c 85.8769 0 155.333 69.4559 155.333 155.333 S 597.765 667.333 511.888 667.333 Z')
  1363. path5.style.transform="scale(0.0205)"
  1364. path5.setAttribute('fill', '#fff');
  1365. morefunction.appendChild(path5);
  1366. morefunction.id = 'morefunction';
  1367. var morefunction_title=document.createElement('div')
  1368. morefunction_title.id='morefunction_title'
  1369. morefunction_title.title=morefunction_title_text
  1370. document.getElementById('divnew').appendChild(morefunction_title)
  1371. document.getElementById("morefunction_title").appendChild(morefunction);
  1372.  
  1373. No1 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1374. var path6 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1375. No1.setAttribute("aria-hidden","true");
  1376. No1.setAttribute('viewbox', '0 0 24 24');
  1377. No1.setAttribute('width', '24px');
  1378. No1.setAttribute('height', '24px');
  1379. path6.setAttribute('d','M975.84684 177.147982H796.422168V104.289287a104.944321 104.944321 0 0 0-107.60847-104.249325H328.226866a105.407651 105.407651 0 0 0-108.303466 104.249325v72.858695H40.498728a34.749775 34.749775 0 1 0 0 68.57289h935.348112a34.749775 34.749775 0 1 0 0-68.57289z m-324.331234 571.517967v-393.830784a37.413924 37.413924 0 0 0-74.712016 0v393.830784a37.413924 37.413924 0 0 0 74.712016 0z m-218.34442 0v-393.830784a34.749775 34.749775 0 1 0-68.804554 0v393.830784a34.749775 34.749775 0 1 0 68.804554 0z m400.433241-428.580559a37.066427 37.066427 0 0 0-37.413924 35.792269v536.304861a35.792268 35.792268 0 0 1-35.676436 35.328938H256.410664a36.023933 36.023933 0 0 1-36.487264-35.328938V354.371835a34.749775 34.749775 0 1 0-68.804555 0V892.066687a108.535131 108.535131 0 0 0 105.407651 110.73595h503.987571A113.515932 113.515932 0 0 0 871.597515 892.066687V355.877659a37.298092 37.298092 0 0 0-37.529757-35.792269z m-112.010108-142.937408H289.770448V104.289287a37.877255 37.877255 0 0 1 38.456418-35.560603h360.586832a33.012286 33.012286 0 0 1 32.780621 35.560603z m0 0')
  1380. path6.style.transform="scale(0.014) translate(0px, -22px)"
  1381. path6.setAttribute('fill', '#fff');
  1382. No1.appendChild(path6);
  1383. No1.id = 'No1';
  1384. No1.setAttribute('className', 'No');
  1385. var No1_title=document.createElement('div')
  1386. No1_title.id='No1_title'
  1387. No1_title.title=No1_title_text
  1388. document.getElementById('divnew').appendChild(No1_title)
  1389. document.getElementById("No1_title").appendChild(No1);
  1390.  
  1391. No2 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1392. var path7 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1393. No2.setAttribute("aria-hidden","true");
  1394. No2.setAttribute('viewbox', '0 0 24 24');
  1395. No2.setAttribute('width', '24px');
  1396. No2.setAttribute('height', '24px');
  1397. if(getCookie("Size")==2){
  1398. No2.style.backgroundColor="red"
  1399. }
  1400. else{
  1401. No2.style.backgroundColor="black"
  1402. }
  1403. path7.setAttribute('d','M879.420952 785.798095c-24.088381 43.495619-89.941333 84.382476-121.660952 135.289905 43.446857 1.536 96.768-6.704762 121.660952 13.433905 4.656762 11.824762 5.461333 27.672381 4.559238 45.104762-32.207238 28.891429-116.736 17.993143-184.734476 17.993143H298.154667c-64.463238 0-160.816762 14.336-162.206477-36.010667-1.852952-64.048762 84.626286-32.768 126.171429-40.594286-25.916952-41.74019-78.896762-95.378286-126.171429-130.730667 71.753143 6.38781 166.66819 28.647619 243.297524 45.104762 2.535619-42.496 6.509714-83.529143 4.534857-130.657523 24.576 11.995429 39.399619 33.718857 63.097905 54.101333 11.849143 10.24 51.712 53.662476 63.073524 54.052571 15.652571 0.536381 48.88381-42.008381 63.097905-54.052571 25.648762-21.918476 43.715048-36.303238 63.049143-54.101333 12.726857 32.304762-3.462095 93.500952 8.97219 126.147047 67.34019-7.826286 161.28-28.062476 234.349714-45.080381z m-482.133333 76.702476c-58.270476-9.435429-127.024762-32.207238-180.224-31.622095 45.470476 24.624762 77.507048 107.398095 139.654095 85.674667-12.653714-11.605333-44.544-27.477333-40.545524-40.594286 39.375238 3.242667 86.137905 21.308952 117.126096 17.968762 2.974476-24.039619-5.924571-59.952762 4.534857-76.531809 26.843429 19.72419 47.152762 46.031238 76.653714 63.073523 24.088381-22.479238 46.713905-46.34819 76.580572-63.073523v76.531809c32.621714 3.510857 79.384381-16.14019 121.660952-17.968762-10.971429 19.065905-35.181714 24.81981-45.104762 45.080381 78.774857 0.512 93.45219-62.805333 139.727238-94.695619-62.561524 11.093333-122.270476 24.966095-184.783238 36.156952-12.995048-26.209524 4.120381-82.310095-8.947809-108.178285-34.06019 29.013333-64.512 61.70819-103.66781 85.625904-36.10819-26.940952-66.901333-59.221333-103.643429-85.625904-1.609143 37.400381 5.217524 83.285333-9.020952 108.178285z M667.623619 528.944762c-46.518857 70.582857-43.300571 191.000381-126.122667 225.401905-9.679238-87.893333-15.506286-179.712-26.989714-265.923048-14.116571 85.113905-22.991238 175.34781-31.573333 265.923048-79.872-38.838857-75.53219-161.792-112.713143-243.419429-3.730286 54.881524 16.871619 124.318476 22.552381 184.832-12.239238 3.267048-9.020952-8.923429-17.993143-9.045333v45.056c-35.498667-71.168-61.781333-151.503238-94.598095-225.28-72.338286 24.624762-157.281524 15.652571-193.77981-31.548953-59.172571-76.409905 11.02019-182.442667 72.094476-225.304381-4.656762-64.560762 40.643048-113.859048 90.063239-130.706285 20.553143-7.021714 45.372952 2.730667 67.632761-4.559238 22.454857-7.314286 29.891048-29.720381 49.615239-45.031619C453.632 0.731429 629.735619 6.753524 699.270095 114.371048c70.680381-5.924571 151.942095 23.600762 166.716953 99.108571 2.29181 11.678476-4.461714 25.185524 0 36.108191 21.211429 52.662857 113.834667 76.312381 90.136381 189.244952-13.336381 63.171048-129.219048 114.93181-216.356572 67.608381-34.084571 60.513524-59.855238 129.365333-85.601524 198.241524-6.826667-10.654476-6.826667-16.65219-22.576762-8.972191 7.070476-60.513524 27.574857-107.666286 36.035048-166.765714z')
  1404. path7.style.transform="scale(0.014)"
  1405. path7.setAttribute('fill', '#fff');
  1406. No2.appendChild(path7);
  1407. No2.id = 'No2';
  1408. No2.setAttribute('class', 'No');
  1409. var No2_title=document.createElement('div')
  1410. No2_title.id='No2_title'
  1411. No2_title.title=No2_title_text
  1412. document.getElementById('divnew').appendChild(No2_title)
  1413. document.getElementById("No2_title").appendChild(No2);
  1414.  
  1415. No3 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1416. var path9 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1417. No3.setAttribute("aria-hidden","true");
  1418. No3.setAttribute('viewbox', '0 0 24 24');
  1419. No3.setAttribute('width', '24px');
  1420. No3.setAttribute('height', '24px');
  1421. path9.setAttribute('d','M512 808.96C177.3568 808.96 64.6144 525.9264 63.488 523.0592l-4.5056-11.5712 4.8128-11.4688C65.024 497.152 188.2112 215.04 512 215.04c334.6432 0 447.3856 283.0336 448.512 285.9008l4.5056 11.5712-4.8128 11.4688C958.976 526.848 835.7888 808.96 512 808.96zM125.952 512.6144C149.1968 562.0736 253.8496 747.52 512 747.52c248.1152 0 360.96-187.5968 386.048-236.1344C874.7008 461.824 770.1504 276.48 512 276.48c-248.1152 0-361.0624 187.5968-386.048 236.1344zM512 675.84a163.84 163.84 0 1 1 163.84-163.84 163.84 163.84 0 0 1-163.84 163.84z m0-266.24a102.4 102.4 0 1 0 102.4 102.4 102.4 102.4 0 0 0-102.4-102.4zM563.2 542.72a81.92 81.92 0 1 1 81.92-81.92 81.92 81.92 0 0 1-81.92 81.92z m0-102.4a20.48 20.48 0 1 0 20.48 20.48 20.48 20.48 0 0 0-20.48-20.48z')
  1422. path9.style.transform="scale(0.015) translate(79px, -153px) rotate(12deg)"
  1423. path9.setAttribute('fill', '#fff');
  1424. No3.appendChild(path9);
  1425. No3.id = 'No3';
  1426. No3.setAttribute('class', 'No');
  1427. var No3_title=document.createElement('div')
  1428. No3_title.id='No3_title'
  1429. No3_title.title=No3_title_text
  1430. document.getElementById('divnew').appendChild(No3_title)
  1431. document.getElementById("No3_title").appendChild(No3);
  1432.  
  1433. No4 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1434. var path11 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1435. No4.setAttribute("aria-hidden","true");
  1436. No4.setAttribute('viewbox', '0 0 24 24');
  1437. No4.setAttribute('width', '24px');
  1438. No4.setAttribute('height', '24px');
  1439. path11.setAttribute('d','M 10.24 2.56 C 5.99893334 2.56 2.56 5.99893334 2.56 10.24 2.56 14.48106666 5.99893334 17.92 10.24 17.92 14.48106666 17.92 17.92 14.48106666 17.92 10.24 17.92 9.81333334 17.885866659999998 9.38666666 17.80906666 8.96 17.57866666 8.53333334 17.06666666 8.53333334 17.06666666 8.53333334 L 15.36 8.53333334 15.36 7.68 C 15.36 6.82666666 14.50666666 6.82666666 14.50666666 6.82666666 L 12.8 6.82666666 12.8 5.97333334 C 12.8 5.12 11.94666666 5.12 11.94666666 5.12 L 11.09333334 5.12 11.09333334 3.41333334 C 11.09333334 2.56 10.24 2.56 10.24 2.56 M 8.10666666 5.12 C 8.81493334 5.12 9.38666666 5.69173334 9.38666666 6.4 9.38666666 7.108266660000001 8.81493334 7.68 8.10666666 7.68 7.3984000000000005 7.68 6.82666666 7.108266660000001 6.82666666 6.4 6.82666666 5.69173334 7.3984000000000005 5.12 8.10666666 5.12 M 5.54666666 8.53333334 C 6.25493334 8.53333334 6.82666666 9.10506666 6.82666666 9.81333334 6.82666666 10.521600000000001 6.25493334 11.09333334 5.54666666 11.09333334 4.8384 11.09333334 4.26666666 10.521600000000001 4.26666666 9.81333334 4.26666666 9.10506666 4.8384 8.53333334 5.54666666 8.53333334 M 9.81333334 9.38666666 C 10.521600000000001 9.38666666 11.09333334 9.958400000000001 11.09333334 10.66666666 11.09333334 11.37493334 10.521600000000001 11.94666666 9.81333334 11.94666666 9.10506666 11.94666666 8.53333334 11.37493334 8.53333334 10.66666666 8.53333334 9.958400000000001 9.10506666 9.38666666 9.81333334 9.38666666 M 14.08 11.09333334 C 14.78826666 11.09333334 15.36 11.66506666 15.36 12.373333339999999 15.36 13.081600000000002 14.78826666 13.65333334 14.08 13.65333334 L 14.08 13.65333334 C 13.37173334 13.65333334 12.8 13.081600000000002 12.8 12.373333339999999 L 12.8 12.373333339999999 C 12.8 11.66506666 13.37173334 11.09333334 14.08 11.09333334 M 9.38666666 13.65333334 C 10.09493334 13.65333334 10.66666666 14.22506666 10.66666666 14.933333339999999 10.66666666 15.6416 10.09493334 16.21333334 9.38666666 16.21333334 8.6784 16.21333334 8.10666666 15.6416 8.10666666 14.933333339999999 8.10666666 14.22506666 8.6784 13.65333334 9.38666666 13.65333334 Z')
  1440. path11.style.transform="scale(0.8) translate(-1px, -2px)"
  1441. path11.setAttribute('fill', '#fff');
  1442. No4.appendChild(path11);
  1443. No4.id = 'No4';
  1444. No4.setAttribute('class', 'No');
  1445. var No4_title=document.createElement('div')
  1446. No4_title.id='No4_title'
  1447. No4_title.title=No3_title_text
  1448. document.getElementById('divnew').appendChild(No4_title)
  1449. document.getElementById("No4_title").appendChild(No4);
  1450.  
  1451.  
  1452. var slider=document.createElement("input")
  1453. slider.id="slider"
  1454. slider.type="range"
  1455. slider.min="1"
  1456. slider.max="10"
  1457. slider.style.display="none"
  1458. if(getCookie("slider")!=""){
  1459. slider.value=getCookie("slider")
  1460. }
  1461. else{
  1462. slider.value="3"
  1463. }
  1464. document.body.appendChild(slider)
  1465.  
  1466.  
  1467. var oText=document.createElement("cookie_text");
  1468. oText.setAttribute("id","text");
  1469. oText.type="text";
  1470. var text1=document.createTextNode("");
  1471. oText.appendChild(text1)
  1472. document.getElementById("divnew").appendChild(oText)
  1473.  
  1474. var Covertitle=document.createElement("cover_title");
  1475. Covertitle.setAttribute("id","covertitle");
  1476. Covertitle.type="text";
  1477. var text2=document.createTextNode("已储存链接");
  1478. Covertitle.appendChild(text2)
  1479. document.getElementById("divnew").appendChild(Covertitle)
  1480.  
  1481.  
  1482. var Textbackground=document.createElement("text_background")
  1483. Textbackground.type="text";
  1484. Textbackground.display="none";
  1485. Textbackground.setAttribute("id","textbackground")
  1486. document.getElementById("divnew").appendChild(Textbackground)
  1487.  
  1488. var BlackCover=document.createElement("black_cover")
  1489. BlackCover.type="text";
  1490. BlackCover.setAttribute("id","blackcover")
  1491. document.getElementById("divnew").appendChild(BlackCover)
  1492.  
  1493. var BigEye = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1494. var path8 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1495. path8.setAttribute('d','M512 808.96C177.3568 808.96 64.6144 525.9264 63.488 523.0592l-4.5056-11.5712 4.8128-11.4688C65.024 497.152 188.2112 215.04 512 215.04c334.6432 0 447.3856 283.0336 448.512 285.9008l4.5056 11.5712-4.8128 11.4688C958.976 526.848 835.7888 808.96 512 808.96zM125.952 512.6144C149.1968 562.0736 253.8496 747.52 512 747.52c248.1152 0 360.96-187.5968 386.048-236.1344C874.7008 461.824 770.1504 276.48 512 276.48c-248.1152 0-361.0624 187.5968-386.048 236.1344zM512 675.84a163.84 163.84 0 1 1 163.84-163.84 163.84 163.84 0 0 1-163.84 163.84z m0-266.24a102.4 102.4 0 1 0 102.4 102.4 102.4 102.4 0 0 0-102.4-102.4zM563.2 542.72a81.92 81.92 0 1 1 81.92-81.92 81.92 81.92 0 0 1-81.92 81.92z m0-102.4a20.48 20.48 0 1 0 20.48 20.48 20.48 20.48 0 0 0-20.48-20.48z')
  1496. path8.style.transform="scale(0.03)"
  1497. path8.setAttribute('fill', '#000');
  1498. BigEye.setAttribute("aria-hidden","true");
  1499. BigEye.setAttribute('viewbox', '0 0 24 24');
  1500. BigEye.setAttribute('width', '37px');
  1501. BigEye.setAttribute('height', '26px');
  1502. BigEye.appendChild(path8);
  1503. BigEye.id = 'bigeye';
  1504. document.getElementById("divnew").appendChild(BigEye);
  1505. var Whitecover = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1506. Whitecover.setAttribute("aria-hidden","true");
  1507. Whitecover.setAttribute('viewbox', '0 0 24 24');
  1508. Whitecover.setAttribute('width', '37px');
  1509. Whitecover.setAttribute('height', '26px');
  1510. Whitecover.id = 'whitecover';
  1511. document.getElementById("divnew").appendChild(Whitecover);
  1512.  
  1513.  
  1514. var Pages = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1515. var path10 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1516. path10.setAttribute('d','M8,3 C8.55228475,3 9,3.44771525 9,4 L9,9 C9,9.55228475 8.55228475,10 8,10 L3,10 C2.44771525,10 2,9.55228475 2,9 L6,9 C7.1045695,9 8,8.1045695 8,7 L8,3 Z M1,1 L6,1 C6.55228475,1 7,1.44771525 7,2 L7,7 C7,7.55228475 6.55228475,8 6,8 L1,8 C0.44771525,8 0,7.55228475 0,7 L0,2 C0,1.44771525 0.44771525,1 1,1 Z')
  1517. path10.style.transform="scale(1.5)"
  1518. path10.setAttribute('fill', '#606060');
  1519. Pages.setAttribute("aria-hidden","true");
  1520. Pages.setAttribute('viewbox', '0 0 24 24');
  1521. Pages.setAttribute('width', '37px');
  1522. Pages.setAttribute('height', '26px');
  1523. Pages.id = 'pages';
  1524.  
  1525.  
  1526. var Pagenumber=document.createElement("page_number");
  1527. Pagenumber.setAttribute("id","pagenumber");
  1528. Pagenumber.type="text";
  1529. var text3=document.createTextNode("");
  1530. Pagenumber.appendChild(text3)
  1531. document.body.appendChild(Pagenumber)
  1532. Pages.appendChild(path10);
  1533. document.getElementById("divnew").appendChild(Pages);
  1534.  
  1535. var preImg_pointer=getCookie("preImg")
  1536. var path12_color='#fff'
  1537. if(preImg_pointer==1){
  1538. path12_color='#0f0'
  1539. }
  1540. else if(preImg_pointer==2){
  1541. path12_color='#00a4ff'
  1542. }
  1543. else if(preImg_pointer==3){
  1544. path12_color='#f00'
  1545. }
  1546.  
  1547. No5 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1548. var path12 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1549. No5.setAttribute("aria-hidden","true");
  1550. No5.setAttribute('viewbox', '0 0 24 24');
  1551. No5.setAttribute('width', '24px');
  1552. No5.setAttribute('height', '24px');
  1553. if(getCookie('bigGif')==1){
  1554. No5.style.backgroundColor='#f00'
  1555. }
  1556. path12.setAttribute('d','M1000.118474 874.180089l-137.726949-137.616258a222.405362 222.405362 0 1 0-179.872446 92.509783 219.139985 219.139985 0 0 0 131.362231-43.639823l137.616258 137.256513a33.926711 33.926711 0 0 0 48.399524 0 34.341801 34.341801 0 0 0 0-48.510215z m-207.545131-159.007243a160.307859 160.307859 0 0 1-219.859474 0 155.382121 155.382121 0 1 1 219.859474 0z M613.309696 953.130256H172.400822a87.694736 87.694736 0 0 1-87.639391-87.63939V158.509134a87.694736 87.694736 0 0 1 87.639391-87.63939h497.029077a87.694736 87.694736 0 0 1 87.639391 87.63939v143.897957a35.448708 35.448708 0 0 0 70.869744 0v-143.897957A158.702843 158.702843 0 0 0 669.429899 0H172.400822A158.702843 158.702843 0 0 0 13.891687 158.509134v706.981732a158.702843 158.702843 0 0 0 158.509135 158.509134h440.908874a35.448708 35.448708 0 1 0 0-70.869744z M550.520376 266.792347a32.709113 32.709113 0 0 0-32.626094-32.626095H198.0534a32.626094 32.626094 0 0 0 0 65.252189h319.674846a32.819803 32.819803 0 0 0 32.764457-32.626094z m-124.111988 180.757972a32.709113 32.709113 0 0 0-32.626094-32.626095H197.998054a32.626094 32.626094 0 1 0 0 65.252189h195.78424a32.709113 32.709113 0 0 0 32.626094-32.626094zM197.998054 595.792887a32.626094 32.626094 0 0 0 0 65.252189h106.650525a32.626094 32.626094 0 1 0 0-65.252189z')
  1557. path12.setAttribute('left','1000px')
  1558. path12.style.transform="scale(0.0124) translateX(134px) translateY(62px)"
  1559. path12.setAttribute('fill',path12_color);
  1560. path12.id='path12';
  1561. No5.appendChild(path12);
  1562. No5.id = 'No5';
  1563. No5.setAttribute('class', 'No');
  1564. var No5_title=document.createElement('div')
  1565. No5_title.id='No5_title'
  1566. No5_title.title=No5_title_text
  1567. document.getElementById('divnew').appendChild(No5_title)
  1568. document.getElementById("No5_title").appendChild(No5);
  1569.  
  1570. var No6 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1571. var path13 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1572. No6.setAttribute("aria-hidden","true");
  1573. No6.setAttribute('viewbox', '0 0 24 24');
  1574. No6.setAttribute('width', '24px');
  1575. No6.setAttribute('height', '24px');
  1576. path13.setAttribute('d','M423.1984 640a83.84 83.84 0 0 1-64-28.8 259.84 259.84 0 0 1-26.88-308.48L441.1184 128a261.12 261.12 0 1 1 448 272l-35.2 57.6a83.84 83.84 0 1 1-145.92-90.24l35.2-57.6a92.8 92.8 0 0 0-158.72-96.64L476.9584 389.76a92.8 92.8 0 0 0 9.6 109.44 83.84 83.84 0 0 1-64 139.52zM357.9184 1024A261.12 261.12 0 0 1 135.1984 626.56L166.5584 576a83.84 83.84 0 1 1 144 87.68l-31.36 51.2a92.8 92.8 0 0 0 30.72 128 91.52 91.52 0 0 0 70.4 10.88 92.16 92.16 0 0 0 57.6-41.6L545.4384 634.24a93.44 93.44 0 0 0-6.4-105.6A83.84 83.84 0 1 1 673.4384 424.96a262.4 262.4 0 0 1 17.28 296.96L581.2784 896A259.84 259.84 0 0 1 417.4384 1016.32a263.68 263.68 0 0 1-59.52 7.68z')
  1577. path13.style.transform="scale(0.0124) translate(1300px, 567px) rotate(137deg)"
  1578. path13.setAttribute('fill','#fff');
  1579. path13.id='path13';
  1580. No6.appendChild(path13);
  1581. No6.id = 'No6';
  1582. No6.setAttribute('class', 'No');
  1583. var No6_title=document.createElement('div')
  1584. No6_title.id='No6_title'
  1585. No6_title.title=No6_title_text
  1586. document.getElementById('divnew').appendChild(No6_title)
  1587. document.getElementById("No6_title").appendChild(No6);
  1588.  
  1589. var slider_box=document.createElement("text")
  1590. slider_box.id="slider_box"
  1591. slider_box.type="text"
  1592. slider_box.style.display="none"
  1593. document.body.appendChild(slider_box)
  1594.  
  1595. var No7 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1596. var path14 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1597. No7.setAttribute("aria-hidden","true");
  1598. No7.setAttribute('viewbox', '0 0 24 24');
  1599. No7.setAttribute('width', '24px');
  1600. No7.setAttribute('height', '24px');
  1601. path14.setAttribute('d','M512 64c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z m0 128a318.46912 318.46912 0 0 1 176.4352 53.05856L245.05856 688.4352A318.46912 318.46912 0 0 1 192 512c0-176.73216 143.26784-320 320-320z m0 640a318.44352 318.44352 0 0 1-176.43008-53.05856l443.37152-443.37152A318.44352 318.44352 0 0 1 832 512c0 176.73216-143.26784 320-320 320z')
  1602. path14.style.transform="scale(0.015) translate(750px, -216px) rotate(67deg)"
  1603. if(getCookie("R-18_block")==""||getCookie("R-18_block")=="0"){
  1604. var path14_color="#fff"
  1605. }
  1606. else if(getCookie("R-18_block")=="1"){
  1607. path14_color="#f00"
  1608. }
  1609. path14.setAttribute('fill',path14_color);
  1610. path14.transition="0.5"
  1611. path14.id='path14';
  1612. No7.appendChild(path14);
  1613. No7.id = 'No7';
  1614. No7.setAttribute('class', 'No');
  1615. var No7_title=document.createElement('div')
  1616. No7_title.id='No7_title'
  1617. No7_title.title=No7_title_text
  1618. document.getElementById('divnew').appendChild(No7_title)
  1619. document.getElementById("No7_title").appendChild(No7);
  1620.  
  1621. No8 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1622. var path15 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1623. No8.setAttribute("aria-hidden","true");
  1624. No8.setAttribute('viewbox', '0 0 24 24');
  1625. No8.setAttribute('width', '24px');
  1626. No8.setAttribute('height', '24px');
  1627. if(getCookie("outUrl")==0){
  1628. var svg=svg_cat
  1629. path15.style.transform="scale(0.017) translate(-391px, -130px)"
  1630. }
  1631. else if(getCookie("outUrl")==1){
  1632. svg=svg_re
  1633. path15.style.transform="scale(0.017) translate(-424px, -120px)"
  1634. }
  1635. else if(getCookie("outUrl")==2){
  1636. svg=svg_moe
  1637. path15.style.transform="scale(0.016) translate(-204px, -130px)"
  1638. }
  1639. path15.setAttribute('d',svg)
  1640. path15.id="path15"
  1641. path15.setAttribute('fill', '#fff');
  1642. No8.appendChild(path15);
  1643. No8.id = 'No8';
  1644. No8.setAttribute('class', 'No');
  1645. var No8_title=document.createElement('div')
  1646. No8_title.id='No8_title'
  1647. No8_title.title=No8_title_text
  1648. document.getElementById('divnew').appendChild(No8_title)
  1649. document.getElementById("No8_title").appendChild(No8);
  1650.  
  1651. var user_add = document.createElementNS("http://www.w3.org/2000/svg", "svg");//人物右侧更多功能
  1652. var path16 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1653. user_add.setAttribute("aria-hidden","true");
  1654. user_add.setAttribute('viewbox', '0 0 32 32');
  1655. user_add.style.height="32px"
  1656. user_add.style.width="32px"
  1657. path16.setAttribute('d','M512 688a80 80 0 1 1 0 160 80 80 0 0 1 0-160z m0-256a80 80 0 1 1 0 160 80 80 0 0 1 0-160z m0-256a80 80 0 1 1 0 160 80 80 0 0 1 0-160z')
  1658. path16.style.transform="scale(0.02) translate(300px, 280px)"
  1659. path16.setAttribute('fill', '#666666');
  1660. path16.id="path16"
  1661. path16.style.transition="0.4s"
  1662. user_add.appendChild(path16);
  1663. user_add.id = 'add';
  1664. var div_add=document.createElement("div")
  1665. document.body.appendChild(div_add)
  1666. div_add.id="div_add"
  1667. var add_cover=document.createElement("a")
  1668. add_cover.id="add_cover"
  1669. div_add.appendChild(add_cover)
  1670. div_add.appendChild(user_add);
  1671.  
  1672. var recommend=document.createElement("div")//相似作者推荐框
  1673. document.body.appendChild(recommend)
  1674. recommend.id="recommend"
  1675. recommend.outerHTML=`<div class="recommend" id="recommend" style="height:270px;left:0px; transform: translateY(0px);opacity: 1;transition: 0.75s;position: fixed;bottom: -350px;z-index: 2;width: 100%;background-color: rgba(0, 0, 0, 0.8);padding: 16px 0px;">
  1676. <div class="recommend_title" id="recommend_title" style="font-size: 16px;line-height: 24px;font-weight: bold;display: flow-root;color: rgb(255, 255, 255);margin-bottom: 24px;text-align: center;">推荐用户</div>
  1677. <div class="recommend_cross" id="recommend_cross" style="color: rgb(255, 255, 255);padding-top: 16px;padding-right: 16px;transition: color 0.2s ease 0s;position:absolute;top: 0px;right: 0px;cursor: pointer;">
  1678. <svg viewBox="0 0 24 24" size="24" class="recommend_svg" id="recommend_svg" style="stroke: none;fill: currentcolor;width: 24px;height: 24px;line-height: 0;font-size: 0px;vertical-align: middle;">
  1679. <path d="M14.8284 12L19.4142 16.5858C20.1953 17.3668 20.1953 18.6332 19.4142 19.4142
  1680. C18.6332 20.1953 17.3668 20.1953 16.5858 19.4142L12 14.8284L7.41421 19.4142
  1681. C6.63317 20.1953 5.36684 20.1953 4.58579 19.4142C3.80474 18.6332 3.80474 17.3668 4.58579 16.5858L9.17157 12
  1682. L4.58579 7.41421C3.80474 6.63317 3.80474 5.36684 4.58579 4.58579
  1683. C5.36684 3.80474 6.63317 3.80474 7.41421 4.58579L12 9.17157L16.5858 4.58579
  1684. C17.3668 3.80474 18.6332 3.80474 19.4142 4.58579C20.1953 5.36684 20.1953 6.63317 19.4142 7.41421L14.8284 12Z" transform="">
  1685. </path>
  1686. </svg>
  1687. </div>
  1688. <div class="recommend_inner_all" id="recommend_inner_all" style="height:225px;position: relative;z-index: 0;overflow: auto;">
  1689. <div class="recommend_inner_1" id="recommend_inner_1" style="overflow-x: auto;padding: 0px;margin: 0px;">
  1690. <ul class="recommend_inner_2" id="recommend_inner_2" style="vertical-align: top;overflow: hidden;list-style: none;padding: 0px;min-width: 100%;box-sizing:border-box;display: inline-flex;margin: 0px;">
  1691. <div class="recommend_inner_real" id="recommend_inner_real" style="white-space: nowrap;line-height: 0;padding: 0px 0px 24px;margin: 0px;list-style: none;"></div>
  1692. </ul>
  1693. </div>
  1694. </div>
  1695. </div>`
  1696.  
  1697.  
  1698. var No9 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1699. var path17 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1700. No9.setAttribute("aria-hidden","true");
  1701. No9.setAttribute('viewbox', '0 0 24 24');
  1702. No9.setAttribute('width', '24px');
  1703. No9.setAttribute('height', '24px');
  1704. path17.setAttribute('d','M1024.000065 920.894642L670.809372 566.972705a365.621836 365.621836 0 1 0-103.836601 103.836602L920.894708 1024zM146.50766 365.880696a219.373101 219.373101 0 1 1 219.373101 219.373101 219.373101 219.373101 0 0 1-219.373101-219.373101z')
  1705. path17.style.transform="scale(0.0124) translate(490px, -73px) rotate(37deg)"
  1706. path17.setAttribute('fill','#fff');
  1707. path17.id='path17';
  1708. No9.appendChild(path17);
  1709. No9.id = 'No9';
  1710. No9.setAttribute('class', 'No');
  1711. var No9_title=document.createElement('div')
  1712. No9_title.id='No9_title'
  1713. No9_title.title=No9_title_text
  1714. document.getElementById('divnew').appendChild(No9_title)
  1715. document.getElementById("No9_title").appendChild(No9);
  1716.  
  1717. var check=document.createElement('check')
  1718. var checkInput=document.createElement('input')
  1719. check.id='check'
  1720. checkInput.id='checkInput'
  1721. check.style.display='none'
  1722. checkInput.style.display='none'
  1723. check.appendChild(checkInput)
  1724. document.getElementById("divnew").appendChild(check);
  1725.  
  1726.  
  1727. var No10 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1728. var path18 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1729. No10.setAttribute("aria-hidden","true");
  1730. No10.setAttribute('viewbox', '0 0 24 24');
  1731. No10.setAttribute('width', '24px');
  1732. No10.setAttribute('height', '24px');
  1733. path18.setAttribute('d','M602.286735 614.33737l23.025908-204.67474h-204.674739l-23.025908 204.67474z m-11.257111 102.337369h-204.674739L358.212109 978.146718a51.168685 51.168685 0 0 1-102.33737-11.25711L284.017516 716.674739H102.368685a51.168685 51.168685 0 0 1 0-102.337369h192.905941l23.025908-204.67474H102.368685a51.168685 51.168685 0 0 1 0-102.337369h227.18896L358.212109 45.853282a51.168685 51.168685 0 0 1 102.337369 11.25711L432.406701 307.325261h204.67474L665.224217 45.853282a51.168685 51.168685 0 0 1 102.33737 11.25711L739.41881 307.325261H921.067641a51.168685 51.168685 0 0 1 0 102.337369h-192.905942l-23.025908 204.67474H921.067641a51.168685 51.168685 0 0 1 0 102.337369h-227.18896L665.224217 978.146718a51.168685 51.168685 0 1 1-102.337369-11.25711z')
  1734. path18.style.transform="scale(0.0124) translate(270px, -73px) rotate(17deg)"
  1735. if(getCookie('tagCookieSetting')==0){
  1736. path18.setAttribute('fill','#fff');
  1737. }
  1738. else if(getCookie('tagCookieSetting')==1){
  1739. path18.setAttribute('fill','#f00');
  1740. }
  1741. path18.id='path18';
  1742. No10.appendChild(path18);
  1743. No10.id = 'No10';
  1744. No10.setAttribute('class', 'No');
  1745. var No10_title=document.createElement('div')
  1746. No10_title.id='No10_title'
  1747. No10_title.title=No10_title_text
  1748. document.getElementById('divnew').appendChild(No10_title)
  1749. document.getElementById("No10_title").appendChild(No10);
  1750.  
  1751.  
  1752. var No11 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1753. var path19 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1754. No11.setAttribute("aria-hidden","true");
  1755. No11.setAttribute('viewbox', '0 0 24 24');
  1756. No11.setAttribute('width', '24px');
  1757. No11.setAttribute('height', '24px');
  1758. path19.setAttribute('d','M682.225853 470.765979c8.511293-8.511293 21.278232-17.022585 29.789524-29.789524 51.067756-59.579048 72.345987-136.180682 59.579048-217.037962-17.022585-114.902451-106.391158-204.271023-221.293608-221.293609-93.624219-12.766939-182.992792 21.278232-242.57184 89.368573-46.812109 63.834695-72.345987 140.436328-59.579049 217.037962 12.766939 63.834695 42.556463 119.158097 93.624219 161.71456-148.947621 51.067756-255.338779 191.504084-255.338779 353.218644v93.624219C86.435368 977.187891 133.247478 1024 192.826526 1024h638.346948c59.579048 0 106.391158-46.812109 106.391158-106.391158v-93.624219c0-161.71456-106.391158-302.150888-255.338779-353.218644zM375.819318 151.592505c34.045171-42.556463 85.112926-63.834695 136.180682-63.834694 8.511293 0 17.022585 0 29.789524 4.255646 76.601634 12.766939 136.180682 76.601634 148.947621 148.947621 8.511293 55.323402-8.511293 106.391158-42.556463 144.691975-42.556463 46.812109-102.135512 72.345987-165.970206 59.579048-76.601634-12.766939-136.180682-76.601634-148.947621-148.947621-8.511293-51.067756 8.511293-106.391158 42.556463-144.691975z m476.632387 766.016337c0 12.766939-8.511293 21.278232-21.278231 21.278232h-638.346948c-12.766939 0-21.278232-8.511293-21.278231-21.278232v-93.624219c0-161.71456 131.925036-289.383949 289.383949-289.383949h97.879865c161.71456 0 289.383949 131.925036 289.38395 289.383949v93.624219z')
  1759. path19.style.transform="scale(0.0124) translate(201px, -122px) rotate(17deg)"
  1760. path19.setAttribute('fill', '#fff');
  1761. No11.appendChild(path19);
  1762. No11.id = 'No11';
  1763. No11.setAttribute('class', 'No');
  1764. var No11_title=document.createElement('div')
  1765. No11_title.id='No11_title'
  1766. No11_title.title=No11_title_text
  1767. document.getElementById('divnew').appendChild(No11_title)
  1768. document.getElementById("No11_title").appendChild(No11);
  1769.  
  1770. var No12 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1771. var path20 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1772. No12.setAttribute("aria-hidden","true");
  1773. No12.setAttribute('viewbox', '0 0 24 24');
  1774. No12.setAttribute('width', '24px');
  1775. No12.setAttribute('height', '24px');
  1776. path20.setAttribute('d','M407.568 154.019c-11.952-11.925-26.904-17.894-41.853-17.894-5.972 0-11.952 2.984-17.929 2.984h-2.992c-8.964 5.961-14.94 11.941-20.921 17.902L81.77 398.634c-23.912 23.862-23.912 59.669 0 80.551 11.956 11.929 26.901 17.894 41.841 17.894 14.948 0 29.896-5.965 41.845-17.894l146.459-146.177v495.198c0 32.815 26.908 56.677 56.797 56.677 29.892 0 56.789-26.854 56.789-56.677V198.775c-0.001-14.925-5.973-32.819-17.933-44.756zM942.59 541.831c-11.956-11.941-26.904-17.905-41.849-17.905-14.944 0-29.889 5.965-41.845 17.905L709.45 690.977V195.791c0-32.819-26.901-56.681-56.785-56.681-29.892 0-56.797 26.85-56.797 56.681v635.391c0 32.811 26.904 56.693 56.797 56.693 14.944 0 29.885-5.98 41.841-17.905l245.097-244.615c26.896-23.859 26.896-59.658 2.987-83.524z')
  1777. path20.style.transform="scale(0.015) translate(-27px, -42px)"
  1778. if(getCookie('singleSort')==1){
  1779. path20.setAttribute('fill', '#f00');
  1780. }
  1781. else{
  1782. path20.setAttribute('fill', '#fff');
  1783. }
  1784. No12.appendChild(path20);
  1785. No12.id = 'No12';
  1786. No12.setAttribute('class', 'No');
  1787. var No12_title=document.createElement('div')
  1788. No12_title.id='No12_title'
  1789. No12_title.title=No12_title_text
  1790. document.getElementById('divnew').appendChild(No12_title)
  1791. document.getElementById("No12_title").appendChild(No12);
  1792.  
  1793. var No13 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  1794. var path21 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  1795. No13.setAttribute("aria-hidden","true");
  1796. No13.setAttribute('viewbox', '0 0 24 24');
  1797. No13.setAttribute('width', '24px');
  1798. No13.setAttribute('height', '24px');
  1799. path21.setAttribute('d','M664.608723 120.804367 93.448322 120.804367c-13.671371 0-24.840758 10.900258-25.206078 24.537859l0 76.92909c0.364297 13.637602 11.533684 24.537859 25.206078 24.537859l571.160401 0c13.900591 0 25.222451-11.266601 25.222451-25.223474l0-75.556836C689.832198 132.070968 678.509315 120.804367 664.608723 120.804367zM93.442182 557.577035l495.547283 0c13.956873 0 25.223474-11.266601 25.223474-25.223474l0-75.556836c0-13.956873-11.266601-25.223474-25.223474-25.223474L93.442182 431.573249c-13.589506 0-24.709775 10.770298-25.199938 24.293289l0 77.415161C68.733431 546.805714 79.851653 557.577035 93.442182 557.577035zM664.608723 742.371808 93.448322 742.371808c-13.671371 0-24.840758 10.900258-25.206078 24.537859l0 76.92909c0.364297 13.637602 11.533684 24.537859 25.206078 24.537859l571.160401 0c13.900591 0 25.222451-11.266601 25.222451-25.223474l0-75.556836C689.832198 753.638409 678.509315 742.371808 664.608723 742.371808zM952.532295 480.136292 742.957139 318.316789c-11.658528-9.416464-33.742499-4.092201-33.742499 23.877827l0 309.62585c0 33.966603 22.083971 33.911344 33.742499 23.877827l209.575156-161.819502C964.134541 505.135662 963.349665 489.497497 952.532295 480.136292z')
  1800. path21.style.transform="scale(0.015) translate(-17px, -42px)"
  1801. if(getCookie('unfold')==0){
  1802. path21.setAttribute('fill', '#fff');
  1803. }
  1804. else{
  1805. path21.setAttribute('fill', '#f00');
  1806. }
  1807. path21.id='path21'
  1808. No13.appendChild(path21);
  1809. No13.id = 'No13';
  1810. No13.setAttribute('class', 'No');
  1811. var No13_title=document.createElement('div')
  1812. No13_title.id='No13_title'
  1813. No13_title.title=No13_title_text
  1814. document.getElementById('divnew').appendChild(No13_title)
  1815. document.getElementById("No13_title").appendChild(No13);
  1816.  
  1817. divNew.insertBefore(No5_title,oText)//将元素按顺序放到相应位置
  1818. divNew.insertBefore(No6_title,oText)
  1819. divNew.insertBefore(No7_title,oText)
  1820. divNew.insertBefore(No8_title,oText)
  1821. divNew.insertBefore(No9_title,oText)
  1822. divNew.insertBefore(No10_title,oText)
  1823. divNew.insertBefore(No11_title,oText)
  1824. divNew.insertBefore(No12_title,oText)
  1825. divNew.insertBefore(No13_title,oText)
  1826.  
  1827. for(var i=1;i<14;i++){
  1828. focusOpacity(document.getElementById('No'+i))
  1829. }
  1830. //——————————————————————————————————————————————————————————————————————————————————————————————
  1831. }
  1832. addAllButton ()
  1833. if(window.location.href.match('#preview')!=null){
  1834. document.getElementById('divnew').style.display='none'
  1835. document.getElementById('div_add').style.display='none'
  1836. }
  1837.  
  1838.  
  1839. function addImg(top_1,left_1,innerHTML,event,type,isChangingSrc){
  1840. if(type=='img'){
  1841. var elem_3=document.getElementById("bigImg_1")
  1842. if(elem_3!=null&&isChangingSrc==0){
  1843. bigpicture_1('move',top_1,left_1,innerHTML,event,'img','','')
  1844. }
  1845. else if(elem_3!=null&&isChangingSrc==1){
  1846. elem_3.remove()
  1847. bigpicture_1('add',top_1,left_1,innerHTML,event,'img','','')
  1848. }
  1849. else{
  1850. bigpicture_1('add',top_1,left_1,innerHTML,event,'img','','')
  1851. }
  1852. }
  1853. else if(type=='gif'){
  1854. elem_3=document.getElementById("bigImg_1")
  1855. if(elem_3!=null&&isChangingSrc==0){
  1856. bigpicture_1('move',top_1,left_1,innerHTML,event,'gif','','')
  1857. }
  1858. else if(elem_3!=null&&isChangingSrc==1){
  1859. elem_3.remove()
  1860. bigpicture_1('add',top_1,left_1,innerHTML,event,'gif')
  1861. }
  1862. else{
  1863. bigpicture_1('add',top_1,left_1,innerHTML,event,'gif')
  1864. }
  1865. }
  1866. }
  1867.  
  1868. function bigpicture_1(position,x,y,innerHTML,event,type){
  1869. if(type=='img'){
  1870. if(position=='move'){
  1871. var bigImg_1 = document.getElementById("bigImg_1");
  1872. bigImg_1.style.top=parseInt(x)+15+"px"
  1873. bigImg_1.style.left=parseInt(y)+15+"px"
  1874. if(getCookie("preImg")!="3"){
  1875. var spaceX=1,spaceY=1//1为下,0为上
  1876. if((720-(event.screenY+bigImg_1.height))<(event.screenY-bigImg_1.height)){
  1877. spaceY=0
  1878. }
  1879. if((1280-(event.screenX+bigImg_1.width))<(event.screenX-bigImg_1.width)){
  1880. spaceX=0
  1881. }
  1882. if(spaceX==0){//0时向左,1时向右
  1883. bigImg_1.style.left=(parseInt(bigImg_1.style.left.match(/\d+/)[0])-bigImg_1.width-30)+"px"
  1884. }
  1885. if(spaceY==0){//0时向上,1时向下
  1886. bigImg_1.style.top=(parseInt(bigImg_1.style.top.match(/\d+/)[0])-bigImg_1.height-30)+"px"
  1887. }
  1888. if(spaceX==0&&spaceY==0){bigImg_1.style.transformOrigin='right bottom'}
  1889. else if(spaceX==0&&spaceY!=0){bigImg_1.style.transformOrigin='right top'}
  1890. else if(spaceX!=0&&spaceY==0){bigImg_1.style.transformOrigin='left bottom'}
  1891. else if(spaceX!=0&&spaceY!=0){bigImg_1.style.transformOrigin='left top'}
  1892. }
  1893. }
  1894. if(position=='add'){
  1895. bigImg_1 = document.createElement("img");
  1896. bigImg_1.id = 'bigImg_1';
  1897. bigImg_1.className='bigImg_1'
  1898. bigImg_1.src = innerHTML;
  1899. bigImg_1.style.top=parseInt(x)+15+"px"
  1900. bigImg_1.style.left=parseInt(y)+15+"px"
  1901. if(getCookie("preImg")!="3"){
  1902. spaceX=1//1为下,0为上
  1903. spaceY=1//1为下,0为上
  1904. if((720-(event.screenY+bigImg_1.height))<(event.screenY-bigImg_1.height)){
  1905. spaceY=0
  1906. }
  1907. if((1280-(event.screenX+bigImg_1.width))<(event.screenX-bigImg_1.width)){
  1908. spaceX=0
  1909. }
  1910. if(spaceX==0){//0时向左,1时向右
  1911. bigImg_1.style.left=(parseInt(bigImg_1.style.left.match(/\d+/)[0])-bigImg_1.width-30)+"px"
  1912. }
  1913. if(spaceY==0){//0时向上,1时向下
  1914. bigImg_1.style.top=(parseInt(bigImg_1.style.top.match(/\d+/)[0])-bigImg_1.height-30)+"px"
  1915. }
  1916. if(spaceX==0&&spaceY==0){bigImg_1.style.transformOrigin='right bottom'}
  1917. else if(spaceX==0&&spaceY!=0){bigImg_1.style.transformOrigin='right top'}
  1918. else if(spaceX!=0&&spaceY==0){bigImg_1.style.transformOrigin='left bottom'}
  1919. else if(spaceX!=0&&spaceY!=0){bigImg_1.style.transformOrigin='left top'}
  1920. }
  1921. document.body.appendChild(bigImg_1)
  1922. }
  1923. }
  1924.  
  1925. else if(type=='gif'){
  1926. if(position=='add'){
  1927. var iframe=document.createElement('iframe')
  1928. iframe.src='https://www.pixiv.net/artworks/'+innerHTML.match(/(?<=\d+\/)\d+(?=\_)/)[0]+'#preview'
  1929. //https://i.pximg.net/c/360x360_70/img-master/img/2022/03/20/19/27/53/97050863_p0_square1200.jpg
  1930. iframe.style.position='absolute'
  1931. iframe.id = 'bigImg_1';
  1932. iframe.className='bigImg_1'
  1933. iframe.style.top=parseInt(y)+25+"px"
  1934. iframe.style.left=parseInt(x)+25+"px"
  1935. iframe.style.width='300px'
  1936. iframe.style.height='300px'
  1937. if(getCookie("preImg")!="3"){
  1938. spaceX=1//1为下,0为上
  1939. spaceY=1//1为下,0为上
  1940. if((720-(event.screenY+parseInt(iframe.style.height.match(/\d+/)[0])))<(event.screenY-parseInt(iframe.style.height.match(/\d+/)[0]))){
  1941. spaceY=0
  1942. }
  1943. if((1280-(event.screenX+parseInt(iframe.style.width.match(/\d+/)[0])))<(event.screenX-parseInt(iframe.style.width.match(/\d+/)[0]))){
  1944. spaceX=0
  1945. }
  1946. if(spaceX==0){//0时向左,1时向右
  1947. iframe.style.left=(parseInt(iframe.style.left.match(/\d+/)[0])-parseInt(iframe.style.width.match(/\d+/)[0])-50)+"px"
  1948. }
  1949. if(spaceY==0){//0时向上,1时向下
  1950. iframe.style.top=(parseInt(iframe.style.top.match(/\d+/)[0])-parseInt(iframe.style.height.match(/\d+/)[0])-50)+"px"
  1951. }
  1952. if(spaceX==0&&spaceY==0){iframe.style.transformOrigin='right bottom'}
  1953. else if(spaceX==0&&spaceY!=0){iframe.style.transformOrigin='right top'}
  1954. else if(spaceX!=0&&spaceY==0){iframe.style.transformOrigin='left bottom'}
  1955. else if(spaceX!=0&&spaceY!=0){iframe.style.transformOrigin='left top'}
  1956. }
  1957. document.body.appendChild(iframe)
  1958. }
  1959.  
  1960. else if(position=='move'){
  1961. iframe=document.getElementById('bigImg_1')
  1962. iframe.style.top=parseInt(x)+25+"px"
  1963. iframe.style.left=parseInt(y)+25+"px"
  1964. if(iframe.style.width=='300px'&&iframe.style.height=='300px'){
  1965. var iframeCanvas=document.getElementById('bigImg_1').contentWindow.document.getElementById('iframe_canvas')
  1966. if(iframeCanvas!=null){
  1967. iframe.style.width=iframeCanvas.width+'px'
  1968. iframe.style.height=iframeCanvas.height+'px'
  1969. }
  1970. }
  1971. if(getCookie("preImg")!="3"){
  1972. spaceX=1//1为下,0为上
  1973. spaceY=1//1为下,0为上
  1974. if((720-(event.screenY+parseInt(iframe.style.height.match(/\d+/)[0])))<(event.screenY-parseInt(iframe.style.height.match(/\d+/)[0]))){
  1975. spaceY=0
  1976. }
  1977. if((1280-(event.screenX+parseInt(iframe.style.width.match(/\d+/)[0])))<(event.screenX-parseInt(iframe.style.width.match(/\d+/)[0]))){
  1978. spaceX=0
  1979. }
  1980. if(spaceX==0){//0时向左,1时向右
  1981. iframe.style.left=(parseInt(iframe.style.left.match(/\d+/)[0])-parseInt(iframe.style.width.match(/\d+/)[0])-50)+"px"
  1982. }
  1983. if(spaceY==0){//0时向上,1时向下
  1984. iframe.style.top=(parseInt(iframe.style.top.match(/\d+/)[0])-parseInt(iframe.style.height.match(/\d+/)[0])-50)+"px"
  1985. }
  1986. if(spaceX==0&&spaceY==0){iframe.style.transformOrigin='right bottom'}
  1987. else if(spaceX==0&&spaceY!=0){iframe.style.transformOrigin='right top'}
  1988. else if(spaceX!=0&&spaceY==0){iframe.style.transformOrigin='left bottom'}
  1989. else if(spaceX!=0&&spaceY!=0){iframe.style.transformOrigin='left top'}
  1990. }
  1991. }
  1992. }
  1993. }
  1994. var m="",n=""
  1995. function GetMouse(oEvent){
  1996. m=oEvent.clientX;
  1997. n=oEvent.clientY;
  1998. document.getElementById("bigImg").style.left=(parseInt(m)-100)+"px";
  1999. document.getElementById("bigImg").style.top=n+"px";
  2000. }
  2001. function mouseX(event){
  2002. document.body.addEventListener('mousemove',(event)=>{
  2003. return event.clientX
  2004. })
  2005. }
  2006. function mouseY(event){
  2007. document.body.addEventListener('mousemove',(event)=>{
  2008. return event.clintY
  2009. })
  2010. }
  2011. function cookie_size(){
  2012. if(document.cookie.length>=7000&&document.cookie.length<7650&&getCookie("Size")!=1){
  2013. alert("链接储存即将溢出")
  2014. var explode=document.getElementById("No2")
  2015. explode.style.backgroundColor="black"
  2016. setCookie("Size",1,-1)
  2017. }
  2018. else if(document.cookie.length>=7650){
  2019. alert('链接储存过大,已停止"核爆"与"Alt"功能使用,请尽快下载链接或清空cookie')
  2020. explode=document.getElementById("No2")
  2021. explode.style.backgroundColor="red"
  2022. setCookie("Size",2,-1)
  2023. }
  2024. else if(document.cookie.length<7000){
  2025. setCookie("Size",0,-1)
  2026. }
  2027. }
  2028.  
  2029.  
  2030. function urlChange(old_url){
  2031. if(window.location.href.match(/#preview/)==null&&old_url!=window.location.href&&window.location.href.match(/(?<=artworks\/)\d+/)!=null){
  2032. if(GM_getValue('pixiv_history')!=null){
  2033. var old_value=GM_getValue('pixiv_history')
  2034. var comma=','//分隔符,避免首位出现逗号
  2035. }
  2036. else{
  2037. old_value=''
  2038. comma=''
  2039. }
  2040. var id=window.location.href.match(/(?<=artworks\/)\d+/)[0]
  2041. GM_xmlhttpRequest({
  2042. method: "GET",
  2043. url: "https://www.pixiv.net/artworks/"+id,
  2044. headers:{
  2045. "User-Agent": navigator.userAgent,
  2046. },
  2047. onload: function(res) {
  2048. if(res.status === 200){
  2049. //console.log('成功')
  2050. var p=res.responseText
  2051. //作品预览图url
  2052. if(p.match(/(?<=\"thumb\"\:\").*?(?=\"\,\")/)!=null){
  2053. if(p.match(/(?<=\"thumb\"\:\").*?(?=\"\,\")/)[0].match(/(?<=img\/).*?(?=\_square)/)!=null){
  2054. var srcPart=p.match(/(?<=\"thumb\"\:\").*?(?=\"\,\")/)[0].match(/(?<=img\/).*?(?=\_square)/)[0]
  2055. }
  2056. else if(p.match(/(?<=\"thumb\"\:\").*?(?=\"\,\")/)[0].match(/(?<=img\/).*?(?=\_custom)/)!=null){
  2057. srcPart=p.match(/(?<=\"thumb\"\:\").*?(?=\"\,\")/)[0].match(/(?<=img\/).*?(?=\_custom)/)[0]+'@'//标定使用custom
  2058. }
  2059. else{
  2060. srcPart='https://www.pixiv.net/favicon.ico'
  2061. }
  2062. }
  2063. //浏览时间
  2064. var timestamp=new Date(Date.parse(new Date()))
  2065. var year=timestamp.getFullYear()-2000
  2066. var month=timestamp.getMonth()+1
  2067. var day=timestamp.getDate()
  2068. if(month<10){
  2069. month='0'+month
  2070. }
  2071. if(day<10){
  2072. day='0'+day
  2073. }
  2074. //R-18
  2075. if(p.match(/(?<=\"tag\"\:\")R-18(?=\")/)!=null){//为R-18
  2076. var R18type=1
  2077. }
  2078. else if(p.match(/(?<=\"tag\"\:\")R-18G(?=\")/)!=null){//为R-18
  2079. R18type=1
  2080. }
  2081. else{
  2082. R18type=0
  2083. }
  2084. //作品名称
  2085. if(p.match(/(?<=\<title\>).*?(?=\<\/title\>)/)!=null){
  2086. var title=p.match(/(?<=\<title\>).*?(?=\<\/title\>)/)[0].replace(' - pixiv','')
  2087. }
  2088. if(GM_getValue('pixiv_history')!=null){
  2089. if(GM_getValue('pixiv_history').split(',')!=null){
  2090. var GM_split=GM_getValue('pixiv_history').split(',')
  2091. }
  2092. else{
  2093. GM_split=[GM_getValue('pixiv_history')]
  2094. }
  2095. if(title!=GM_split[0].split('+')[1]){
  2096. if(GM_getValue('pixiv_history')!=null&&GM_getValue('pixiv_history').split(',').length<=500){
  2097. GM_setValue('pixiv_history',srcPart+'+'+title+'+'+year+month+day+'+'+R18type+comma+old_value)
  2098. }
  2099. else{
  2100. old_value=old_value.replace(/^.*?,/,'')
  2101. GM_setValue('pixiv_history',srcPart+'+'+title+'+'+year+month+day+'+'+R18type+comma+old_value)
  2102. }
  2103. }
  2104. }
  2105. else if(GM_getValue('pixiv_history')==null){
  2106. if(GM_getValue('pixiv_history')!=null&&GM_getValue('pixiv_history').split(',').length<=500){
  2107. GM_setValue('pixiv_history',srcPart+'+'+title+'+'+year+month+day+'+'+R18type+comma+old_value)
  2108. }
  2109. else{
  2110. old_value=old_value.replace(/^.*?,/,'')
  2111. GM_setValue('pixiv_history',srcPart+'+'+title+'+'+year+month+day+'+'+R18type+comma+old_value)
  2112. }
  2113. }
  2114. return window.location.href
  2115. }
  2116. }
  2117. })
  2118. }
  2119. else{
  2120. return old_url
  2121. }
  2122. }
  2123.  
  2124. function innerHistory(src,title,date,date_type,R18_type,element_id){
  2125. if(src!=null&&title!=null&&date!=null&&date_type!=null){
  2126. var historyBack=document.getElementById('history_back')
  2127.  
  2128. if(date_type=='add'){
  2129. var historyDate=document.createElement('div')
  2130. historyDate.className='history_date'
  2131. historyDate.innerText='20'+date.substring(0,2)+'年'+date.substring(2,4)+'月'+date.substring(4,6)+'日'
  2132. historyBack.appendChild(historyDate)
  2133. }
  2134.  
  2135. var history_textOut=document.createElement('div')
  2136. history_textOut.className='history_textOut'
  2137. history_textOut.id='history'+element_id
  2138. historyBack.appendChild(history_textOut)
  2139. history_textOut.onmouseenter=function(){
  2140. history_textOut.getElementsByTagName('svg')[history_textOut.getElementsByTagName('svg').length-1].style.opacity='0.8'
  2141. }
  2142. history_textOut.onmouseleave=function(){
  2143. history_textOut.getElementsByTagName('svg')[history_textOut.getElementsByTagName('svg').length-1].style.opacity='0'
  2144. }
  2145.  
  2146. var historyImg=document.createElement('img')
  2147. historyImg.className='history_img'
  2148. historyImg.src=src
  2149. history_textOut.appendChild(historyImg)
  2150.  
  2151. var historyTitle=document.createElement('a')
  2152. historyTitle.className='history_title'
  2153. historyTitle.innerText=title
  2154. if(src.match(/(?<=\/)\d+(?=\_)/)!=null){
  2155. historyTitle.href='https://www.pixiv.net/artworks/'+src.match(/(?<=\/)\d+(?=\_)/)[0]
  2156. }
  2157. else{
  2158. historyTitle.href='javascript:alert("该链接获取失败")'
  2159. }
  2160. if(R18_type=='1'){
  2161. var historyR18 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2162. var pathHistoryR18 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  2163. historyR18.setAttribute("aria-hidden","true");
  2164. historyR18.setAttribute('viewbox', '0 0 16 16');
  2165. historyR18.setAttribute('width', '16px');
  2166. historyR18.setAttribute('height', '16px');
  2167. pathHistoryR18.setAttribute('d','M512 64c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z m0 128a318.46912 318.46912 0 0 1 176.4352 53.05856L245.05856 688.4352A318.46912 318.46912 0 0 1 192 512c0-176.73216 143.26784-320 320-320z m0 640a318.44352 318.44352 0 0 1-176.43008-53.05856l443.37152-443.37152A318.44352 318.44352 0 0 1 832 512c0 176.73216-143.26784 320-320 320z')
  2168. pathHistoryR18.style.transform="scale(0.015)"
  2169. pathHistoryR18.setAttribute('fill', '#f00');
  2170. pathHistoryR18.style.opacity='0.6'
  2171. pathHistoryR18.id='pathHistoryR18'
  2172. historyR18.appendChild(pathHistoryR18);
  2173. historyR18.id = 'history_R18';
  2174. history_textOut.appendChild(historyR18);
  2175. }
  2176. history_textOut.appendChild(historyTitle)
  2177. //delete
  2178.  
  2179. var historyDelete = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2180. var pathHistoryDelete = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  2181. historyDelete.setAttribute("aria-hidden","true");
  2182. historyDelete.setAttribute('viewbox', '0 0 25 25');
  2183. historyDelete.setAttribute('width', '25px');
  2184. historyDelete.setAttribute('height', '25px');
  2185. pathHistoryDelete.setAttribute('d','M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z')
  2186. pathHistoryDelete.style.transform="translate(0px, 0px) scale(0.025)"
  2187. pathHistoryDelete.setAttribute('fill', '#000');
  2188. pathHistoryDelete.style.opacity='0.5'
  2189. pathHistoryDelete.id='pathHistoryDelete'
  2190. historyDelete.appendChild(pathHistoryDelete);
  2191. historyDelete.id = 'history_delete';
  2192. historyDelete.onclick=function(){
  2193. var GMall=GM_getValue('pixiv_history').split(',')
  2194. var history_itemNumber=((parseInt(document.getElementById('history_pageNum').innerText)-1)*15+1)+parseInt(historyDelete.closest('div').id.match(/\d+/)[0])//第几条历史记录
  2195. if(getCookie('history_R18')==0){//隐藏R-18
  2196. var count=0
  2197. for(var i=0;i<GMall.length;i++){
  2198. if(GMall[i].split('+')[GMall[i].split('+').length-1]==0){
  2199. count++
  2200. if(count==history_itemNumber){
  2201. console.log(GMall[i])
  2202. GMall[i]=''
  2203. break
  2204. }
  2205. }
  2206. }
  2207. }
  2208. else if(getCookie('history_R18')==1){//显示R-18
  2209. console.log(GMall[history_itemNumber-1])
  2210. GMall[history_itemNumber-1]=''
  2211. }
  2212. var final_value=''
  2213. for(var j=0;j<GMall.length;j++){
  2214. if(GMall[j]!=''&&j!=GMall.length-1){
  2215. var comma=','
  2216. }
  2217. else{
  2218. comma=''
  2219. }
  2220. final_value=final_value+GMall[j]+comma
  2221. }
  2222. GM_setValue('pixiv_history',final_value)
  2223. if(document.getElementById('history_back').getElementsByClassName('history_textOut').length==15){
  2224. var history_deleteAdd=(parseInt(document.getElementById('history_pageNum').innerText))*15-1
  2225. }
  2226. else{
  2227. history_deleteAdd=0
  2228. }
  2229. if(historyDelete.closest('div').previousSibling!=null&&historyDelete.closest('div').nextSibling!=null){
  2230. if(historyDelete.closest('div').previousSibling.className=='history_date'&&historyDelete.closest('div').nextSibling.className=='history_date'){
  2231. historyDelete.closest('div').previousSibling.remove()
  2232. }
  2233. }
  2234. historyDelete.closest('div').remove()
  2235. if(history_deleteAdd!=0){
  2236. addHistory(history_deleteAdd,1)
  2237. }
  2238. for(var q=0;q<document.getElementsByClassName('history_textOut').length;q++){
  2239. if(document.getElementsByClassName('history_textOut')!=null){
  2240. document.getElementsByClassName('history_textOut')[q].id='history'+q
  2241. }
  2242. }
  2243. }
  2244. history_textOut.appendChild(historyDelete);
  2245. }
  2246. }
  2247.  
  2248. function addHistory(startNum,addType){//addType为0则为添加15条历史记录,为1则为一条历史记录
  2249. if(GM_getValue('pixiv_history')!=null){
  2250. var GMvalue_split=GM_getValue('pixiv_history').split(',')
  2251. }
  2252. else{
  2253. GMvalue_split=['']
  2254. }
  2255. var src=[]
  2256. var title=[]
  2257. var date=[]
  2258. var R18type=[]
  2259. var history_count=0
  2260. if(getCookie('history_R18')==1){//放置R-18
  2261. for(var j=0;j<GMvalue_split.length;j++){
  2262. R18type[j]=GMvalue_split[j].split('+')[3]
  2263. if(GMvalue_split[j].split('+')[0].match('@')!=null){//通过@标定custom
  2264. src[j]='https://i.pximg.net/c/250x250_80_a2/custom-thumb/img/'+GMvalue_split[j].split('+')[0].replace('@','')+'_custom1200.jpg'
  2265. }
  2266. else{//square情况
  2267. src[j]='https://i.pximg.net/c/250x250_80_a2/img-master/img/'+GMvalue_split[j].split('+')[0]+'_square1200.jpg'
  2268. }
  2269. title[j]=GMvalue_split[j].split('+')[1]
  2270. date[j]=GMvalue_split[j].split('+')[2]
  2271. }
  2272. }
  2273. else if(getCookie('history_R18')==0){//隐藏R-18
  2274. for(j=0;j<GMvalue_split.length;j++){
  2275. if(GMvalue_split[j].split('+')[3]==0){
  2276. R18type[history_count]=GMvalue_split[j].split('+')[3]
  2277. if(GMvalue_split[j].split('+')[0].match('@')!=null){//通过@标定custom
  2278. src[history_count]='https://i.pximg.net/c/250x250_80_a2/custom-thumb/img/'+GMvalue_split[j].split('+')[0].replace('@','')+'_custom1200.jpg'
  2279. }
  2280. else{//square情况
  2281. src[history_count]='https://i.pximg.net/c/250x250_80_a2/img-master/img/'+GMvalue_split[j].split('+')[0]+'_square1200.jpg'
  2282. }
  2283. title[history_count]=GMvalue_split[j].split('+')[1]
  2284. date[history_count]=GMvalue_split[j].split('+')[2]
  2285. history_count++
  2286. }
  2287. }
  2288. }
  2289. var date_check=''
  2290. all_historyList=src.length
  2291. var element_id=0
  2292. if(addType==0){
  2293. var endNum=startNum+15
  2294. }
  2295. else if(addType==1){
  2296. endNum=startNum+1
  2297. }
  2298. for(var i=startNum;i<endNum;i++){
  2299. if(src[i]==null){//防止最后一页i溢出
  2300. break
  2301. }
  2302. if(addType==0){
  2303. if(date_check!=date[i]){
  2304. var date_type='add'
  2305. date_check=date[i]
  2306. }
  2307. else{
  2308. date_type='none'
  2309. }
  2310. }
  2311. else if(addType==1){
  2312. if(document.getElementById('history_back')!=null&&document.getElementById('history_back').getElementsByClassName('history_date')!=null){
  2313. var length=document.getElementById('history_back').getElementsByClassName('history_date').length
  2314. var last_date_text=document.getElementById('history_back').getElementsByClassName('history_date')[length-1].innerText
  2315. var last_date_num=last_date_text.replace(/[年|月|日]/g,'').substr(2)
  2316. if(date[i]!=last_date_num){
  2317. date_type='add'
  2318. }
  2319. else{
  2320. date_type='none'
  2321. }
  2322. }
  2323. }
  2324. innerHistory(src[i],title[i],date[i],date_type,R18type[i],element_id)
  2325. element_id++
  2326. }
  2327. }
  2328.  
  2329. //原图url请求
  2330. function getPageNum(event,element){//判断链接图片数量
  2331. if(element==0&&event!=null){
  2332. if(event.target.closest("a").innerText!=""&&event.target.closest("a").innerText.match(/((^R-18$)|(^R-18G$))/)==null){
  2333. var pageNum=event.target.closest("a").innerText.match(/(?<=((R\-18\n)|(R\-18G\n)|^))\d{1,2}/)[0]
  2334. return pageNum
  2335. }
  2336. else{
  2337. pageNum=1
  2338. return pageNum
  2339. }
  2340. }
  2341. else if(event==0&&element!=null){
  2342. var pageCheck=element.outerHTML.match(/(?<=<span>)\d{1,3}(?=<\/span>)/)//判断有没有图片
  2343. if(pageCheck!=null){
  2344. pageNum=element.outerHTML.match(/(?<=<span>)\d{1,3}(?=<\/span>)/)[0]
  2345. return pageNum
  2346. }
  2347. else{
  2348. pageNum=1
  2349. return pageNum
  2350. }
  2351. }
  2352. }
  2353.  
  2354. function userAllPic(k,id){
  2355. if(k==0){//主作者
  2356. var userImg_id=document.getElementsByTagName("aside")[0].innerHTML.match(/(?<=\/users\/)\d+/)[0]
  2357. }
  2358. else if(k==1){//推荐图片部分
  2359. userImg_id=id
  2360. }
  2361. if(document.getElementById('userImgBack')==null){
  2362. var userImgBack=document.createElement('div')//整体背景div
  2363. userImgBack.id='userImgBack'
  2364. document.body.appendChild(userImgBack)
  2365.  
  2366. var userImgUl=document.createElement('ul')//整体框架
  2367. userImgUl.id='userImgUl'
  2368. userImgUl.className='userImgUl'
  2369. userImgBack.appendChild(userImgUl)
  2370.  
  2371. var userImgTitleBackground=document.createElement('background')//标题背景
  2372. userImgTitleBackground.id='userImgTitleBackground'
  2373. userImgBack.appendChild(userImgTitleBackground)
  2374.  
  2375. var userImgTitle=document.createElement('a')//标题
  2376. userImgTitle.id='userImgTitle'
  2377. userImgTitle.innerText='作者作品'
  2378. userImgBack.appendChild(userImgTitle)
  2379.  
  2380. var userImgCross = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2381. var path_userImg = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  2382. userImgCross.setAttribute("aria-hidden","true");
  2383. userImgCross.setAttribute('viewbox', '0 0 24 24');
  2384. userImgCross.setAttribute('width', '24px');
  2385. userImgCross.setAttribute('height', '24px');
  2386. path_userImg.setAttribute('d','M14.8284 12L19.4142 16.5858C20.1953 17.3668 20.1953 18.6332 19.4142 19.4142 C18.6332 20.1953 17.3668 20.1953 16.5858 19.4142L12 14.8284L7.41421 19.4142 C6.63317 20.1953 5.36684 20.1953 4.58579 19.4142C3.80474 18.6332 3.80474 17.3668 4.58579 16.5858L9.17157 12 L4.58579 7.41421C3.80474 6.63317 3.80474 5.36684 4.58579 4.58579 C5.36684 3.80474 6.63317 3.80474 7.41421 4.58579L12 9.17157L16.5858 4.58579 C17.3668 3.80474 18.6332 3.80474 19.4142 4.58579C20.1953 5.36684 20.1953 6.63317 19.4142 7.41421L14.8284 12Z')
  2387. path_userImg.setAttribute('fill', '#fff');
  2388. path_userImg.id='path_userImg'
  2389. userImgCross.appendChild(path_userImg);
  2390. userImgCross.id = 'userImgCross';
  2391. // userImgCross.setAttribute('class', 'No');
  2392. userImgBack.appendChild(userImgCross);
  2393.  
  2394. var userImg_underImg=document.createElement('a')
  2395. userImg_underImg.id='userImg_underImg'
  2396. userImg_underImg.style.width='100%'
  2397. userImg_underImg.style.height='40%'
  2398. userImg_underImg.style.position='fixed'
  2399. userImg_underImg.style.top='0px'
  2400. document.body.appendChild(userImg_underImg)
  2401.  
  2402. GM_xmlhttpRequest({
  2403. method: "GET",
  2404. url: "https://www.pixiv.net/ajax/user/"+userImg_id+"/profile/all?lang=zh",
  2405. headers:{
  2406. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52",
  2407. },
  2408. onload: function(res) {
  2409. if(res.status === 200){
  2410. //console.log('成功')
  2411. var p=res.responseText
  2412. var user_illust=p.match(/(?<=\")\d+(?=\":null)/g)
  2413. if(user_illust.length>=35){
  2414. var userImg_length=35
  2415. }
  2416. else{
  2417. userImg_length=user_illust.length
  2418. }
  2419. var userImg_allUrl
  2420. userImg_allUrl='https://www.pixiv.net/ajax/user/'+userImg_id+'/profile/illusts?'
  2421. for(var i=0;i<userImg_length;i++){
  2422. userImg_allUrl=userImg_allUrl+'ids%5B%5D='+user_illust[i]+'&'
  2423.  
  2424. }
  2425. userImg_allUrl=userImg_allUrl+'work_category=illustManga&is_first_page=0&lang=zh'
  2426.  
  2427.  
  2428. var src=[]//图片src
  2429. var id=[]//图片id
  2430. var title=[]//图片名称
  2431. var pageCount=[]//作品图片数
  2432. var R18=[]//作品是否为R-18,1为是,0为不是
  2433. var gif=[]//作品是否为动图,1为是,0为不是
  2434. var count=0
  2435. GM_xmlhttpRequest({
  2436. method: "GET",
  2437. url: userImg_allUrl,
  2438. headers:{
  2439. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52",
  2440. },
  2441. onload: function(res) {
  2442. if(res.status === 200){
  2443. // console.log('成功')
  2444. var p=res.responseText
  2445. var b=JSON.parse(p.replace(/\\(?!(\/|u))/g,'\\'))
  2446. b=b.body.works
  2447. // var b=p.match(/(?<=\d+":{).*?(?=,"\d+":{)/g)
  2448. for(var i=0;i<Object.keys(b).length;i++){
  2449. id[i]=b[user_illust[i]].id
  2450. title[i]=b[user_illust[i]].title
  2451. src[i]=b[user_illust[i]].url
  2452. pageCount[i]=b[user_illust[i]].pageCount
  2453. gif[i]='0'
  2454. if(b[user_illust[i]].illustType==2){
  2455. gif[i]='1'
  2456. }
  2457. R18[i]='0'
  2458. if(b[user_illust[i]].tags.toString().match('R\-18')!=null){
  2459. R18[i]='1'
  2460. }
  2461. }
  2462. for(var j=0;j<30;j++){
  2463. var userSrc=src[j].replace(/\\/g,'')
  2464. var uni=title[j]
  2465. var href='https://www.pixiv.net/artworks/'+id[j]
  2466.  
  2467. var userImgAll=document.createElement('div')//单个添加元素(图片和文字)
  2468. userImgAll.className='userImgAll'
  2469. userImgUl.appendChild(userImgAll)
  2470.  
  2471. if(pageCount[j]!=1){
  2472. var userPageAll=document.createElement('div')
  2473. userPageAll.className='userPageAll'
  2474. var k=pageCount[j].toString().split('').length
  2475. if(k>=3){
  2476. userPageAll.style.width='43px'
  2477. userPageAll.style.left='132px'
  2478. }
  2479. else if(k==2){
  2480. userPageAll.style.width='36px'
  2481. userPageAll.style.left='140px'
  2482. }
  2483. else if(k==1){
  2484. userPageAll.style.width='30px'
  2485. userPageAll.style.left='146px'
  2486. }
  2487. userImgAll.appendChild(userPageAll)
  2488.  
  2489. var userImgPageSvg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2490. var path_Img = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  2491. userImgPageSvg.setAttribute("aria-hidden","true");
  2492. userImgPageSvg.setAttribute('viewbox', '0 0 9 10');
  2493. userImgPageSvg.setAttribute('width', '24px');
  2494. userImgPageSvg.setAttribute('height', '24px');
  2495. path_Img.setAttribute('d','M8,3 C8.55228475,3 9,3.44771525 9,4 L9,9 C9,9.55228475 8.55228475,10 8,10 L3,10 C2.44771525,10 2,9.55228475 2,9 L6,9 C7.1045695,9 8,8.1045695 8,7 L8,3 Z M1,1 L6,1 C6.55228475,1 7,1.44771525 7,2 L7,7 C7,7.55228475 6.55228475,8 6,8 L1,8 C0.44771525,8 0,7.55228475 0,7 L0,2 C0,1.44771525 0.44771525,1 1,1 Z')
  2496. path_Img.setAttribute('fill', '#fff');
  2497. userImgPageSvg.appendChild(path_Img);
  2498. userImgPageSvg.id='userImgPageSvg'
  2499. userPageAll.appendChild(userImgPageSvg);
  2500.  
  2501. var userPageText=document.createElement('text')
  2502. userPageText.className='userPageText'
  2503. userPageText.innerText=pageCount[j]
  2504. userPageAll.appendChild(userPageText)
  2505. }
  2506.  
  2507. if(R18[j]=='1'){
  2508. var userImgR18=document.createElement('text')
  2509. userImgR18.className='userImgR18'
  2510. userImgR18.innerText='R-18'
  2511. if(pageCount[j]!=1){
  2512. userImgR18.style.left='-27px'
  2513. }
  2514. userImgAll.appendChild(userImgR18)
  2515. }
  2516.  
  2517. var userImgPic=document.createElement('img')//单个图片
  2518. userImgPic.className='userImgPic'
  2519. userImgPic.src=userSrc
  2520. userImgPic.href=href
  2521. if(gif[j]=='1'){
  2522. userImgPic.style.top='18px'
  2523. }
  2524. userImgAll.appendChild(userImgPic)
  2525.  
  2526. if(gif[j]=='1'){
  2527. var userImgGif = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2528. var path_Gif = '<circle cx="12" cy="12" r="10" class="sc-192k5ld-1 lajlxF"></circle><path d="M9,8.74841664 L9,15.2515834 C9,15.8038681 9.44771525,16.2515834 10,16.2515834C10.1782928,16.2515834 10.3533435,16.2039156 10.5070201,16.1135176 L16.0347118,12.8619342C16.510745,12.5819147 16.6696454,11.969013 16.3896259,11.4929799C16.3034179,11.3464262 16.1812655,11.2242738 16.0347118,11.1380658 L10.5070201,7.88648243C10.030987,7.60646294 9.41808527,7.76536339 9.13806578,8.24139652C9.04766776,8.39507316 9,8.57012386 9,8.74841664 Z" class="sc-192k5ld-2 jwyUTl"></path>'
  2529. userImgGif.setAttribute("aria-hidden","true");
  2530. userImgGif.setAttribute('width', '24px');
  2531. userImgGif.setAttribute('height', '24px');
  2532. userImgGif.setAttribute('viewbox', '0 0 24 24');
  2533. userImgGif.innerHTML=path_Gif
  2534. userImgGif.id='userImgGif'
  2535. userImgAll.appendChild(userImgGif);
  2536. }
  2537.  
  2538. var userImgText=document.createElement('a')
  2539. userImgText.className='userImgText'
  2540. userImgText.innerText=eval("'"+uni+"'")
  2541. userImgText.href=href
  2542. if(gif[j]=='1'){
  2543. userImgText.style.top='29px'
  2544. }
  2545. userImgAll.appendChild(userImgText)
  2546. }
  2547. }
  2548. }
  2549. })
  2550. }
  2551. else{console.log("失败")}
  2552. }
  2553. })
  2554. }
  2555. }
  2556. //相似作者推荐
  2557. function add_recommend(url_1,user_href_1,url_2,user_href_2,url_3,user_href_3,user_pic,user_title_view,user_id,user_url,left){
  2558. var recom=document.createElement("li")
  2559. var recommend_out=document.getElementById("recommend_inner_real")//id通过创建时添加,为可以放置li文件的上一个元素
  2560. recommend_out.appendChild(recom)
  2561. var outerHtml=`<li class="li_all" id="li_all" style="position:absolute;top:0px;left:*leftpx;transform: translateY(0px) scale(1) rotateZ(0deg); opacity: 1; z-index: 1;">
  2562. <div class="li_all_2" style="width: 392px;background-color: rgb(255, 255, 255);-webkit-mask-image: -webkit-radial-gradient(center,white,black);border-radius: 8px;overflow: hidden;">
  2563. <div class="li_all_3" style="display: flex;">
  2564. <div class="li_pic" style="width: 33.333%;height: 130px;overflow: hidden;">
  2565. <div class="li_all_5" style="width: 136px;">
  2566. <div type="illust" size="136" class="li_all_6" style="position: relative;">
  2567. <div width="136" height="136" class="li_all_7" style="position: relative;z-index: 0;width: 136px;height: 136px;">
  2568. <a class="li_a_1" id="li_a_1" data-gtm-value="*user_id" href="*user_href_1" style="text-decoration: none;">
  2569. <div class="li_a_1_nom" style="position: absolute;top: 0px;left: 0px;right: 0px;box-sizing: border-box;display: flex;align-items: flex-start;padding: 4px 4px 0px;z-index: 1;"></div>
  2570. <div class="li_img_out_1" id="li_img_out_1" style="position: relative;display: flex;-webkit-box-align: center;align-items: center;-webkit-box-pack: center;justify-content: center;width: 100%;height: 100%;">
  2571. <img src="*url_1" alt="*name" class="li_img_1" id="li_img_1" style="width: 100%;height: 100%;border-radius: 0px;background-color: rgb(255, 255, 255);transition: opacity 0.2s ease 0s;object-fit: cover; object-position: center center;">
  2572. </div>
  2573. </a>
  2574. </div>
  2575. </div>
  2576. </div>
  2577. </div>
  2578. <div class="li_pic" style="width: 33.333%;height: 130px;overflow: hidden;">
  2579. <div class="li_all_5" style="width: 136px;">
  2580. <div type="illust" size="136" class="li_all_6" style="position: relative;">
  2581. <div width="136" height="136" class="li_all_7" style="position: relative;z-index: 0;width: 136px;height: 136px;">
  2582. <a class="li_a_2" id="li_a_2" data-gtm-value="*user_id" href="*user_href_2" style="text-decoration: none;">
  2583. <div class="li_a_2_nom" style="position: absolute;top: 0px;left: 0px;right: 0px;box-sizing: border-box;display: flex;align-items: flex-start;padding: 4px 4px 0px;z-index: 1;"></div>
  2584. <div class="li_img_out_2" id="li_img_out_2" style="position: relative;display: flex;-webkit-box-align: center;align-items: center;-webkit-box-pack: center;justify-content: center;width: 100%;height: 100%;">
  2585. <img src="*url_2" alt="*name" class="li_img_2" id="li_img_2" style="width: 100%;height: 100%;border-radius: 0px;background-color: rgb(255, 255, 255);transition: opacity 0.2s ease 0s;object-fit: cover; object-position: center center;">
  2586. </div>
  2587. </a>
  2588. </div>
  2589. </div>
  2590. </div>
  2591. </div>
  2592. <div class="li_pic" style="width: 33.333%;height: 130px;overflow: hidden;">
  2593. <div class="li_all_5" style="width: 136px;">
  2594. <div type="illust" size="136" class="li_all_6" style="position: relative;">
  2595. <div width="136" height="136" class="li_all_7" style="position: relative;z-index: 0;width: 136px;height: 136px;">
  2596. <a class="li_a_3" id="li_a_3" data-gtm-value="*user_id" href="*user_href_3" style="text-decoration: none;">
  2597. <div class="li_a_3_nom" style="position: absolute;top: 0px;left: 0px;right: 0px;box-sizing: border-box;display: flex;align-items: flex-start;padding: 4px 4px 0px;z-index: 1;"></div>
  2598. <div class="li_img_out_3" id="li_img_out_3" style="position: relative;display: flex;-webkit-box-align: center;align-items: center;-webkit-box-pack: center;justify-content: center;width: 100%;height: 100%;">
  2599. <img src="*url_3" alt="*name" class="li_img_3" id="li_img_3" style="width: 100%;height: 100%;border-radius: 0px;background-color: rgb(255, 255, 255);transition: opacity 0.2s ease 0s;object-fit: cover; object-position: center center;">
  2600. </div>
  2601. </a>
  2602. </div>
  2603. </div>
  2604. </div>
  2605. </div>
  2606. </div>
  2607. <div class="li_all_3" style="display: flex;-webkit-box-align: center;align-items: center;padding: 0px 16px;height: 64px;">
  2608. <a class="li_a_3" id="li_a_3" data-gtm-value="*recommend_id" href="*recommend_user_url" style="color: inherit;text-decoration: none;">
  2609. <div class="li_name" size="40" title="*user_user_name" role="img" class="sc-1asno00-0 jIsznR">
  2610. <img class="li_img_4" id="li_img_4" src="*user_pic" width="40" height="40" alt="*user_name" style="border-radius:20px;object-fit: cover; object-position: center top;">
  2611. </div>
  2612. </a>
  2613. <div class="li_a_out"style="display: grid;color: rgba(0, 0, 0, 0.88);font-weight: bold;font-size: 14px;line-height: 22px;padding: 0px 8px;margin: auto 0px;flex: 1 1 0%;overflow: hidden;">
  2614. <a class="li_a_4" id="li_a_4" data-gtm-value="*user_id" href="*user_url">*user_title_view</a>
  2615. </div>
  2616. </div>
  2617. </div>
  2618. </li>`
  2619. outerHtml=outerHtml.replace("*url_1",url_1)
  2620. outerHtml=outerHtml.replace("*url_2",url_2)
  2621. outerHtml=outerHtml.replace("*url_3",url_3)
  2622. outerHtml=outerHtml.replace("*user_href_1",user_href_1)
  2623. outerHtml=outerHtml.replace("*user_href_2",user_href_2)
  2624. outerHtml=outerHtml.replace("*user_href_3",user_href_3)
  2625. outerHtml=outerHtml.replace("*user_pic",user_pic)
  2626. outerHtml=outerHtml.replace("*user_title_view",user_title_view)
  2627. outerHtml=outerHtml.replace("*user_id",user_id)
  2628. outerHtml=outerHtml.replace("*user_url",user_url)
  2629. outerHtml=outerHtml.replace("*recommend_user_url",user_url)
  2630. outerHtml=outerHtml.replace("*left",left)
  2631. recom.outerHTML=outerHtml
  2632. }
  2633.  
  2634. function aside(type){
  2635. if(document.getElementsByTagName("aside").length!=0&&window.location.href.match('#preview')==null&&window.location.href.match('bookmarks')==null){
  2636. var user_id=document.getElementsByTagName("aside")[0].innerHTML.match(/(?<=\/users\/)\d+/)
  2637. //------
  2638. if(user_id!=null){
  2639. user_id=user_id[0]
  2640. }
  2641. //------
  2642. if(type=="recommend"){
  2643. var getURL='https://www.pixiv.net/rpc/index.php?mode=following_user_detail&user_id='+user_id+'&lang=zh'
  2644. }
  2645. GM_xmlhttpRequest({
  2646. method: "GET",
  2647. url: getURL,
  2648. headers:{
  2649. "x-user-id":10000000
  2650. },
  2651. onload: function(res) {
  2652. if(res.status === 200){
  2653. //console.log('成功')
  2654. var p=res.responseText
  2655. if(type=="recommend"){
  2656. var replace=p.match(/(?<="restrict":")\d+/)[0]
  2657. if(replace!=null){
  2658. setCookie("aside",getCookie("aside").replace(/\d+(?=\,)/,replace),90)//0为关注,1为隐私关注
  2659. }
  2660. else{
  2661. setCookie("aside",getCookie("aside").replace(/\d+(?=\,)/,2),90)//2为未关注
  2662. }
  2663. }
  2664. }
  2665. else{// if(res.status == 400){
  2666. setCookie("aside",getCookie("aside").replace(/\d+(?=\,)/,2),90)//2为未关注
  2667. console.log("关注获取失败,锚点“function aside(type)”")
  2668. }
  2669. }
  2670. })
  2671. }
  2672. }
  2673.  
  2674. function getFinalUrl(k,e,num){//k=0为ctrl事件,k=1为alt事件,k=2为核爆,e为event即事件,num为图片数量
  2675. cookie_size()
  2676. if(getCookie('Size')==2){
  2677. if(k!=0){
  2678. return
  2679. }
  2680. }
  2681. var block=""//防止cat和re在“图片数量限制”的影响下出现多张图片不加“-1”的情况
  2682. var num_alt=num
  2683. var lastUrl=""//最终需要设置为cookie的元素
  2684. var set_moe
  2685. if(k==2&&document.getElementsByClassName("sc-9y4be5-1 jtUPOE")[0].children.length!=0){//核爆事件;"document"部分用来判定页面上是否有可以核爆的元素,防止报错
  2686. var ULpicture=document.getElementsByClassName("sc-9y4be5-1 jtUPOE")[0].children
  2687. for(var w=0;w<ULpicture.length;w++){
  2688. var num_explode=getPageNum(0,ULpicture[w])
  2689. if(ULpicture[w].outerHTML.match(/(?<=\d{1,3}\/)\d{6,10}(?=_p)/)!=null){
  2690. lastUrl=lastUrl+ULpicture[w].outerHTML.match(/(?<=\d{1,3}\/)\d{6,10}(?=_p)/)[0]+"*"+num_explode+","
  2691. }
  2692. }
  2693. setCookie("user_url",lastUrl,-1)
  2694. }
  2695.  
  2696. if(parseInt(num)>getCookie("slider")){//alt和ctrl时判断是否大于“最大打开次数”
  2697. num=1
  2698. block="-1"
  2699. }
  2700.  
  2701. if(e!=-1){
  2702. if(getCookie("outUrl")==0){//0为cat
  2703. var cat_id=e.target.src.match(/\d{6,10}/)[0]//window.location.href.match(/\d{6,10}/)
  2704. if(num>1){
  2705. if(k==0){
  2706. for(var i=1;i<parseInt(num)+1;i++){
  2707. window.open("https://pixiv.cat/"+cat_id+"-"+i+".png")
  2708. }
  2709. }
  2710. else if(k==1){
  2711. setCookie("pixivid"+lastcookie(),cat_id+"*"+num_alt,-1)
  2712. }
  2713. }
  2714. else{
  2715. if(k==0){
  2716. window.open("https://pixiv.cat/"+cat_id+block+".png")
  2717. }
  2718. else if(k==1){
  2719. setCookie("pixivid"+lastcookie(),cat_id+"*"+num_alt,-1)
  2720. }
  2721. }
  2722. }
  2723.  
  2724. else if(getCookie("outUrl")==1){//1为re
  2725. var re_id=e.target.src.match(/\d{6,10}/)[0]//window.location.href.match(/\d{6,10}/)
  2726. if(num>1){
  2727. if(k==0){
  2728. for(var j=1;j<parseInt(num)+1;j++){
  2729. window.open("https://pixiv.re/"+re_id+"-"+j+".png")
  2730. }
  2731. }
  2732. else if(k==1){
  2733. setCookie("pixivid"+lastcookie(),re_id+"*"+num_alt,-1)
  2734. }
  2735. }
  2736. else{
  2737. if(k==0){
  2738. window.open("https://pixiv.re/"+re_id+block+".png")
  2739. }
  2740. else if(k==1){
  2741. setCookie("pixivid"+lastcookie(),re_id+"*"+num_alt,-1)
  2742. }
  2743. }
  2744. }
  2745.  
  2746. else if(getCookie("outUrl")==2){//2代表使用moe
  2747. var moe_pid=e.target.src.match(/\d{6,10}/)[0]
  2748. if(moe_pid!=null){
  2749. GM_xmlhttpRequest({
  2750. method: "GET",
  2751. url: "https://www.pixiv.net/artworks/"+moe_pid,
  2752. headers:{
  2753. "User-Agent": navigator.userAgent,
  2754. },
  2755. onload: function(res) {
  2756. if(res.status === 200){
  2757. //console.log('成功')
  2758. var p=res.responseText
  2759. var moe_url1=p.split('"original":"')[1]
  2760. var moe_url2=moe_url1.split('"},"tags":{"')[0]//moe_url1和2根据原始url的前后端框住真实url
  2761. var moe_url_model="https://i.pixiv.re/"+moe_url2.split("i.pximg.net/")[1]//+"@progressive.webp"//https://api.pixiv.moe/image/i.pximg.net/img-original/img/2021/10/14/00/49/28/93428795_p0.png@progressive.webp
  2762. for(var i=0;i<num;i++){
  2763. if(k==0){
  2764. window.open(moe_url_model.replace(/p\d{1,2}/,"p"+i),"_blank")
  2765. }
  2766. }
  2767. setCookie("pixivid"+lastcookie(),moe_url2.split("https://")[1].split("/img/")[1]+"*"+num_alt,-1)
  2768. }
  2769. }
  2770. })
  2771. }
  2772. }
  2773. }
  2774. }
  2775.  
  2776. //——————————————————————————————————————————————R-18模糊函数开始
  2777. function r18_block(blur){
  2778. var match_1=/([_=:;&\-\/\.\?\d\w]+?illust_id=(\d+)(?:&|$|))/
  2779. var match_2=/(http(?:s|):\/\/[_\-\/\.\d\w]+?\/(\d{4,})_p\d{1,4}[_\-\/\.\d\w]*)/
  2780. var match_3=/(http(?:s|):\/\/[_\-\/\.\d\w]+?\/(\d{4,})_square\d{0,4})/
  2781. var pp=0
  2782. var qq=0
  2783. new MutationObserver(mutations => {//动图预览相关
  2784. if(window.location.href.match('#preview')!=null){
  2785. var root=document.getElementById('root')
  2786. if(root!=null){
  2787. root.style.display='none'
  2788. }
  2789. // console.log('------------------')
  2790. for(var k=0;k<mutations.length;k++){
  2791. if(qq==0&&mutations[k].addedNodes[0]!=null&&mutations[k].addedNodes[0].className=='sc-tu09d3-1 inGOuX'){
  2792. var canvas_div=mutations[k].addedNodes[0]
  2793. document.body.insertBefore(canvas_div,root)
  2794. document.body.style.overflow='hidden'
  2795. for(var q=0;q<canvas_div.childNodes.length;q++){
  2796. if(canvas_div.childNodes[q].tagName=='CANVAS'){
  2797. canvas_div.childNodes[q].id='iframe_canvas'
  2798. canvas_div.style.width=canvas_div.childNodes[q].width+'px'
  2799. canvas_div.style.height=canvas_div.childNodes[q].height+'px'
  2800. break
  2801. }
  2802. }
  2803. qq=1
  2804. }
  2805. }
  2806. }
  2807. /* for(var o=0;o<mutations.length;o++){
  2808. //console.log(mutations[o].addedNodes)
  2809. if(mutations[o].addedNodes[0]!=null&&mutations[o].addedNodes[0].closest('.sc-8dwwmi-0 eHTuWt')!=null){
  2810. document.getElementsByClassName('sc-8dwwmi-0 eHTuWt')[0].remove()
  2811. }
  2812. } */
  2813. for(var i=0;i<mutations.length;i++){
  2814. if(mutations[i].addedNodes.length!=0){
  2815. if(mutations[i].addedNodes[0].src!=null){
  2816. if(mutations[i].addedNodes[0].src.match(match_1)!=null||mutations[i].addedNodes[0].src.match(match_2)!=null||mutations[i].addedNodes[0].src.match(match_3)!=null){
  2817. if(mutations[i].addedNodes[0].src.match("master1200")==null){
  2818. switch(mutations[i].type) {
  2819. case 'childList':
  2820. var mutate=mutations[i].addedNodes[0]
  2821. var count=0
  2822. for(var j=0;j<10;j++){
  2823. if(mutate==null){
  2824. break
  2825. }
  2826. else if(mutate.className=="sc-k3uf3r-0 jTkWOR"){//悬停作者头像显示的弹框的class
  2827. count=1
  2828. break
  2829. }
  2830. else{
  2831. mutate=mutate.parentNode
  2832. }
  2833. }
  2834. if(count==0&&mutations[i].addedNodes[0].id!='bigImg_1'&&mutations[i].addedNodes[0].parentNode.nextSibling!=null&&mutations[i].addedNodes[0].parentNode.nextSibling.innerText.match("R-18")!=null){
  2835. mutations[i].addedNodes[0].style.filter="blur("+blur+"px)"
  2836. }
  2837. break;
  2838. }
  2839. }
  2840. }
  2841. }
  2842. else if(mutations[i].addedNodes[0].childNodes[0]!=null&&mutations[i].addedNodes[0].childNodes[0].childNodes.length!=0&&mutations[i].addedNodes[0].childNodes[0].getElementsByClassName('sc-162tykz-1 bmXCSR')!='null'){//预览图部分预览作者
  2843. //向“sc-162tykz-1 bmXCSR”中添加按钮,移出时会自动删除,不用管
  2844. var user_out=document.getElementsByClassName('sc-k3uf3r-3 hZKJGk')[0]//用户悬停弹窗中“已关注”部分的父节点
  2845. if(user_out!=null){
  2846. if(document.getElementById('user_svg')==null){
  2847. var user_svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2848. var user_svg_path= document.createElementNS("http://www.w3.org/2000/svg", 'path');
  2849. user_svg.setAttribute("aria-hidden","true");
  2850. user_svg.setAttribute('viewbox', '0 0 20 20');
  2851. user_svg.setAttribute('width', '20px');
  2852. user_svg.setAttribute('height', '20px');
  2853. user_svg_path.setAttribute('d','M678.409391 581.630361l345.795505 345.727206-96.642434 96.642433L581.903555 678.204495z M394.765557 789.531115a394.765557 394.765557 0 1 1 394.765558-394.765558 394.765557 394.765557 0 0 1-394.765558 394.765558z m0-652.934036a258.168479 258.168479 0 1 0 258.168479 258.168478A258.851464 258.851464 0 0 0 394.765557 136.597079z')
  2854. user_svg_path.id="user_svg_path"
  2855. user_svg_path.style.transform='scale(0.018)'
  2856. user_svg_path.setAttribute('fill', '#000');
  2857. user_svg.appendChild(user_svg_path);
  2858. user_svg.id = 'user_svg';
  2859. user_out.appendChild(user_svg)
  2860. var user_svg_background=document.createElement('a')
  2861. user_svg_background.id='user_svg_background'
  2862. user_out.appendChild(user_svg_background)
  2863. }
  2864. }
  2865. }
  2866. }
  2867. }
  2868. if(getCookie('unfold')==1){
  2869. for(var e=0;e<mutations.length;e++){
  2870. if(mutations[e].addedNodes.length!=0){
  2871. for(var r=0;r<mutations[e].addedNodes.length;r++){
  2872. //console.log(mutations[i].addedNodes[r])
  2873. if(mutations[e].addedNodes.legnth!=0&&mutations[e].addedNodes[r].getElementsByClassName('sc-emr523-2 wEKy').length!=0){//作品页展开按钮
  2874. //console.log(mutations[e].addedNodes[r])
  2875. console.log('click')
  2876. mutations[e].addedNodes[r].getElementsByClassName('sc-emr523-2 wEKy')[0].click()
  2877. }
  2878. }
  2879. }
  2880. }
  2881. }
  2882. }).observe(document.body, {childList: true, subtree: true})
  2883. }
  2884.  
  2885. function search_sort(){
  2886. if(document.getElementById('sort_ul')==null&&document.getElementById('load_count_div')==null){
  2887. allBookmark=[]
  2888. if(window.location.href.match(/\/tags\//)!=null){
  2889.  
  2890. var href=window.location.href
  2891. var search_order='date_d',search_mode='all',search_type='all',search_s_mode='s_tag'
  2892.  
  2893. if(href.match(/(?<=\/tags\/).*?(?=\/)/)!=null){
  2894. var search_name=href.match(/(?<=\/tags\/).*?(?=\/)/)[0]
  2895. }
  2896.  
  2897. if(href.match(/(?<=order\=).*?(?=(\&|$))/)!=null){
  2898. search_order=href.match(/(?<=order\=).*?(?=(\&|$))/)[0]
  2899. }
  2900.  
  2901. if(href.match(/(?<=[^s\_]mode\=).*?(?=(\&|$))/)!=null){
  2902. search_mode=href.match(/(?<=[^s\_]mode\=).*?(?=(\&|$))/)[0]
  2903. }
  2904.  
  2905. if(href.match(/(?<=type\=).*?(?=(\&|$))/)!=null){
  2906. search_type=href.match(/(?<=type\=).*?(?=(\&|$))/)[0]
  2907. }
  2908.  
  2909. if(href.match(/(?<=s_mode\=).*?(?=(\&|$))/)!=null){
  2910. search_s_mode=href.match(/(?<=s_mode\=).*?(?=(\&|$))/)[0]
  2911. }
  2912.  
  2913. var finalURL='https://www.pixiv.net/ajax/search/artworks/'+search_name+'?word='+search_name+'&order='+search_order+'&mode='+search_mode+'&type='+search_type+'&s_mode='+search_s_mode+'&lang=zh'
  2914. /* var sortPage=prompt('请输入排序页数')
  2915. if(sortPage.match(',')!=null){
  2916. var sort_start=parseInt(sortPage.split(',')[0])
  2917. var sort_end=parseInt(sortPage.split(',')[1])
  2918. }
  2919. else{
  2920. sort_start=1
  2921. sort_end=parseInt(sortPage)
  2922. } */
  2923. var sort_start=document.getElementById('sort_input_start').value
  2924. var sort_end=document.getElementById('sort_input_end').value
  2925. if(sort_start!=null&&sort_end!=null){
  2926. // details([58132914,58390527,58466452,58631790])
  2927. /* if(sort_end-sort_start>=22){
  2928. sort_end=sort_start+21
  2929. } */
  2930. var search_count=0
  2931. var idArr=[]
  2932. for(var i=sort_start-1;i<sort_end;i++){
  2933. GM_xmlhttpRequest({
  2934. method: "GET",
  2935. url: finalURL+'&p='+(i+1),
  2936. cookie: "",
  2937. headers:{
  2938. "User-Agent": navigator.userAgent,
  2939. "x-user-id": Math.floor(Math.random()*10000000),
  2940. },
  2941. onload: function(res) {
  2942. if(res.status === 200){
  2943. //console.log('成功')
  2944. var p=res.responseText
  2945. // console.log(p)
  2946. var json=JSON.parse(p.replace(/\\(?!(\/|u))/g,'\\'))
  2947. // idArr=idArr.concat(p.match(/(?<=[^bookmarkData\"\:]\{\"id\"\:\")\d+(?=\")/g))
  2948. for(var n=0;n<json.body.illustManga.data.length;n++){
  2949. idArr.push(json.body.illustManga.data[n].id)
  2950. }
  2951. if(search_count==sort_end-sort_start){
  2952. details(idArr)
  2953. console.log(idArr.toString())
  2954. }
  2955. search_count++
  2956. }
  2957. }
  2958. })
  2959. }
  2960. }
  2961. }
  2962. }
  2963. }
  2964.  
  2965. function sortRequest(page,sortTag,stop,isR18,sum_count){
  2966. allBookmark=[]
  2967. var count=0
  2968. var last_count=window.location.href.match(/(?<=\#sort\d+\.)\d+/)
  2969. if(last_count!=null){
  2970. last_count=last_count[0]
  2971. }
  2972. else{
  2973. last_count=0
  2974. }
  2975. GM_xmlhttpRequest({
  2976. method: "GET",
  2977. url: "https://api.moedog.org/pixiv/v2/?type=search&word="+sortTag+"&order=popular_desc&page="+page,
  2978. headers:{
  2979. "User-Agent": navigator.userAgent,
  2980. },
  2981. onload: function(res) {
  2982. if(res.status === 200){
  2983. //console.log('成功')
  2984. var p=res.responseText
  2985. var json=JSON.parse(p.replace(/\\(?!(\/|u))/g,'\\'))
  2986. //console.log(json)
  2987. for(var e=0;e<30;e++){//数量锁定为30,有隐患!!!
  2988. count++
  2989. var R_18=false
  2990. if(JSON.stringify(json.illusts[e].tags).match(/(R18|R\-18)/)){
  2991. R_18=true
  2992. }
  2993. if((R_18==true&&isR18==1)||R_18==false&&isR18==2){//前者为作品为R18但不能看,后者为作品不是R18但需要看
  2994. continue
  2995. }
  2996. var bookmarkNum=json.illusts[e].total_bookmarks
  2997. var illustID=json.illusts[e].id
  2998. var illustName=json.illusts[e].title
  2999. var illustImg=json.illusts[e].image_urls.square_medium//.replace('https://i.pximg.net/c/128x128','https://i.pximg.net/c/250x250_80_a2')
  3000. var illustNumber=json.illusts[e].page_count
  3001. var illustType=json.illusts[e].type
  3002. if(illustType=='ugoira'){
  3003. illustType=2//动图
  3004. }
  3005. else{
  3006. illustType=0
  3007. }
  3008. var illustRestrict=2//暂时失效,因此固定为“未收藏”//json.body.illust_details.bookmark_restrict//0-普通收藏;1-隐私收藏;2-未收藏
  3009. if(illustRestrict==null){
  3010. illustRestrict=2
  3011. }
  3012. var authorID=json.illusts[e].user.id
  3013. var authorName=json.illusts[e].user.name
  3014. if(bookmarkNum.length!=0&&illustID.length!=0){
  3015. if(count>last_count){
  3016. allBookmark[e]=bookmarkNum+','+illustID+','+illustName+','+illustImg+','+illustNumber+','+illustType+','+R_18+','+illustRestrict+','+authorID+','+authorName
  3017. sum_count++
  3018. }
  3019. }
  3020. if(sum_count>=60){
  3021. break
  3022. }
  3023. }
  3024.  
  3025. //收藏数,作品id,作品名称,作品预览图,作品数量,作品类型,R_18,是否收藏,作者id,作者名称;
  3026. //var allBookmark_split=[]
  3027. for(var r=0;r<30;r++){
  3028. if(allBookmark[r]!=null){
  3029. var sort_info=allBookmark[r].split(',')
  3030. sort_addillust(sort_info[0],sort_info[1],sort_info[2],sort_info[3],sort_info[4],sort_info[5],sort_info[6],sort_info[7],sort_info[8],sort_info[9])
  3031. }
  3032. }
  3033.  
  3034. if(count!=30){
  3035. page--
  3036. }
  3037. if(window.location.href.match(/(?<=\#sort)\d+/)==null){
  3038. window.location.href=window.location.href+"#sort"+page
  3039. }
  3040. else{
  3041. window.location.href=window.location.href.replace(/(?<=\#sort)\d+/,page)
  3042. }
  3043. if(window.location.href.match(/(?<=\#sort\d+\.)\d+/)==null){
  3044. if(count==30){
  3045. window.location.href=window.location.href+"."+0
  3046. }
  3047. else{
  3048. window.location.href=window.location.href+"."+count
  3049. }
  3050. }
  3051. else{
  3052. if(count==30){
  3053. window.location.href=window.location.href.replace(/(?<=\#sort\d+\.)\d+/,0)
  3054. }
  3055. else{
  3056. window.location.href=window.location.href.replace(/(?<=\#sort\d+\.)\d+/,count)
  3057. }
  3058. }
  3059. if(sum_count<59){
  3060. sortRequest(page+1,sortTag,true,isR18,sum_count)
  3061. }
  3062. }
  3063. }
  3064. })
  3065. }
  3066. function onlySort(keyword,page,stop){//stop:0为继续,1为停止
  3067. GM_xmlhttpRequest({
  3068. method: "GET",
  3069. url: "https://api.moedog.org/pixiv/v2/?type=search&word="+keyword+"&order=date_desc&page="+page,
  3070. headers:{
  3071. "User-Agent": navigator.userAgent,
  3072. },
  3073. onload: function(res) {
  3074. if(res.status === 200){
  3075. //console.log('成功')
  3076. var p=res.responseText
  3077. var json=JSON.parse(p.replace(/\\(?!(\/|u))/g,'\\'))
  3078. console.log(res.finalUrl)
  3079. console.log(json)
  3080. for(var e=0;e<30;e++){
  3081. var R_18=false
  3082. if(JSON.stringify(json.illusts[e].tags).match(/(R18|R\-18)/)){
  3083. R_18=true
  3084. }
  3085. // if((R_18==true&&isR18==1)||R_18==false&&isR18==2){//前者为作品为R18但不能看,后者为作品不是R18但需要看
  3086. // continue
  3087. // }
  3088. var bookmarkNum=json.illusts[e].total_bookmarks
  3089. var illustID=json.illusts[e].id
  3090. var illustName=json.illusts[e].title
  3091. var illustImg=json.illusts[e].image_urls.square_medium//.replace('https://i.pximg.net/c/128x128','https://i.pximg.net/c/250x250_80_a2')
  3092. var illustNumber=json.illusts[e].page_count
  3093. var illustType=json.illusts[e].type
  3094. if(illustType=='ugoira'){
  3095. illustType=2//动图
  3096. }
  3097. else{
  3098. illustType=0
  3099. }
  3100. var illustRestrict=2//暂时失效,因此固定为“未收藏”//json.body.illust_details.bookmark_restrict//0-普通收藏;1-隐私收藏;2-未收藏
  3101. if(illustRestrict==null){
  3102. illustRestrict=2
  3103. }
  3104. var authorID=json.illusts[e].user.id
  3105. var authorName=json.illusts[e].user.name
  3106. if(allBookmark[bookmarkNum]==null){
  3107. allBookmark[bookmarkNum]=bookmarkNum+','+illustID+','+illustName+','+illustImg+','+illustNumber+','+illustType+','+R_18+','+illustRestrict+','+authorID+','+authorName
  3108. }
  3109. else{
  3110. allBookmark[bookmarkNum]=allBookmark[bookmarkNum]+';'+bookmarkNum+','+illustID+','+illustName+','+illustImg+','+illustNumber+','+illustType+','+R_18+','+illustRestrict+','+authorID+','+authorName
  3111. }
  3112. //console.log(res.finalUrl)
  3113. }
  3114. if(stop==false){
  3115. onlySort(keyword,page+1,true)
  3116. }
  3117. else{
  3118. allBookmark = allBookmark.filter(function (s) {
  3119. if(s&&s.trim()){
  3120. return true
  3121. }
  3122. else{
  3123. return false
  3124. }
  3125. })
  3126. var allBookmarkSplit=[]
  3127. var allBookmarkSplit_count=0
  3128. for(var w=0;w<allBookmark.length;w++){
  3129. if(allBookmark[w].match(/;/)==null){
  3130. allBookmarkSplit[allBookmarkSplit_count]=allBookmark[w];
  3131. allBookmarkSplit_count++;
  3132. }
  3133. else{
  3134. for(var ew=0;ew<allBookmark[w].split(';').length;ew++){
  3135. allBookmarkSplit[allBookmarkSplit_count]=allBookmark[w].split(';')[ew];
  3136. allBookmarkSplit_count++;
  3137. }
  3138. }
  3139. }
  3140. //收藏数,作品id,作品名称,作品预览图,作品数量,作品类型,R_18,是否收藏,作者id,作者名称;
  3141. for(w=allBookmarkSplit.length-1;w>=0;w--){
  3142. var sort_info=allBookmarkSplit[w].split(',')
  3143. sort_addillust(sort_info[0],sort_info[1],sort_info[2],sort_info[3],sort_info[4],sort_info[5],sort_info[6],sort_info[7],sort_info[8],sort_info[9])
  3144. }
  3145. }
  3146. // else{
  3147. //console.log(allBookmarkSplit)
  3148. //console.log(allBookmark)
  3149. // }
  3150. }
  3151. }
  3152. })
  3153. }
  3154. /* window.addEventListener('keydown',function(e){
  3155. if(e.keyCode==68){
  3156. var sort_ul=document.createElement('ul')
  3157. sort_ul.id='sort_ul'
  3158. sort_ul.className='sort_ul'
  3159. var sort_ul_out=document.getElementsByClassName('sc-l7cibp-0 juyBTC')[0]//搜索界面“预览图”框架的ul元素的父元素
  3160. sort_ul_out.appendChild(sort_ul)
  3161. if(document.getElementsByClassName('sc-l7cibp-3 gCRmsl')!=null){
  3162. sort_ul_out.insertBefore(sort_ul,document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0])
  3163. }
  3164. document.getElementsByClassName('sc-l7cibp-1 krFoBL')[0].style.display='none'//原本搜索页ul元素
  3165. document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0].style.display='none'//原本页面页码部分(换页)
  3166.  
  3167. var sort_more_out=document.createElement('div')
  3168. sort_more_out.id='sort_more_out'
  3169. sort_ul_out.appendChild(sort_more_out)
  3170.  
  3171. var keyword=window.location.href.match(/(?<=\/tags\/).*?(?=\/(artworks|illustrations|manga|novels))/)
  3172. var page=window.location.href.match(/(?<=\&p=)\d+/)
  3173. if(page==null){
  3174. page=1
  3175. }
  3176. else{
  3177. page=page[0]
  3178. }
  3179. if(keyword!=null&&page!=null){
  3180. onlySort(keyword[0],page,false)
  3181. }
  3182. else{
  3183. console.log("获取地址相关数据失败")
  3184. }
  3185. }
  3186. }) */
  3187. //——————————————————————————R-18模糊内容开始
  3188. var original_url=window.location.href
  3189. window.addEventListener('click',function(event){
  3190. var new_url=window.location.href
  3191. if(new_url!=original_url){
  3192. if(getCookie("R-18_block")=="1"){
  3193. r18_block(5)
  3194. }
  3195. else if(getCookie("R-18_block")=="0"||getCookie("R-18_block")==""){
  3196. r18_block(0)
  3197. }
  3198. aside("recommend")
  3199. original_url=window.location.href
  3200. }
  3201. })
  3202. if(getCookie("R-18_block")=="1"){
  3203. r18_block(5)
  3204. }
  3205. else if(getCookie("R-18_block")=="0"||getCookie("R-18_block")==""){
  3206. r18_block(0)
  3207. }
  3208. //——————————————————————————————————————————R-18模糊结束
  3209.  
  3210.  
  3211. window.addEventListener('load', function(){
  3212. var style = document.createElement('style');
  3213. style.innerHTML =
  3214. '.fvHsDQ:after{'+
  3215. 'display:none;'+
  3216. '}'+
  3217. '.hYvGvO{'+
  3218. 'display:none;'+
  3219. '}'
  3220. ;
  3221. document.body.appendChild(style);
  3222. })
  3223. window.addEventListener('contextmenu',function (event){
  3224. if(getCookie('Size')!=2){
  3225. //————————————————————————————————
  3226. //————————————————————————————————
  3227. var el=event.target
  3228. if(el!=null){
  3229. var url,pid,HTML,results
  3230. if(event.ctrlKey==true){
  3231. HTML=el.outerHTML
  3232. for(var i in match_rules){
  3233. results=HTML.match(match_rules[i])
  3234. if(results!=null&&results.length>1){
  3235. url=results[1]
  3236. pid=results[2]
  3237. break
  3238. }
  3239. }
  3240. if(event.altKey!=true&&event.shiftKey!=true){
  3241. var pageNum=getPageNum(event,0)
  3242. getFinalUrl(0,event,pageNum)
  3243. event.preventDefault()
  3244. }
  3245. }
  3246. //——————————————————————————————————————————ctrl事件结束,alt事件开始
  3247. //自动普通收藏↓↓↓
  3248. if(event.altKey==true&&event.ctrlKey!=true){
  3249. // var del_element=event.target.closest('a').nextSibling.childNodes[0].childNodes[0].childNodes[0]//预览图中的svg元素(红心)
  3250. // if(del_element.childNodes.length==4||del_element.childNodes.length==5){
  3251. // del_element.childNodes[del_element.childNodes.length-1].remove()
  3252. // del_element.childNodes[del_element.childNodes.length-1].remove()
  3253. // }
  3254.  
  3255. isProhibit=0//0为未屏蔽,1为屏蔽
  3256. var cookie_tag_safe=[]
  3257. var id=event.target.src.match(/\d{6,10}/)[0]
  3258. GM_xmlhttpRequest({
  3259. method: "GET",
  3260. url: "https://www.pixiv.net/artworks/"+id,
  3261. headers:{
  3262. "User-Agent": navigator.userAgent,
  3263. },
  3264. onload: function(res) {
  3265. if(res.status === 200){
  3266. //console.log('成功')
  3267. var p=res.responseText
  3268. var final=p.match(/(?<="tag":").*?(?=")/g).toString().split(',')
  3269. if(GM_getValue('tagSaveSafe')==''){
  3270. var tag_cookie=tagSaveSafe.split('*')
  3271. }
  3272. else{
  3273. tag_cookie=GM_getValue('tagSaveSafe').split('*')
  3274. }
  3275. if(GM_getValue('tagProhibit')==''){
  3276. var tag_Prohibit=''
  3277. }
  3278. else{
  3279. tag_Prohibit=GM_getValue('tagProhibit')
  3280. }
  3281. cookie_tag_safe[0]='全部'
  3282. var count=1
  3283. if(getCookie('tagCookieSetting')==1){
  3284. for(var i=0;i<final.length;i++){
  3285. for(var j=0;j<tag_cookie.length;j++){
  3286. if(tag_Prohibit.match(final[i])!=null){
  3287. isProhibit=final[i];
  3288. break;
  3289. }
  3290. if(tag_cookie[j].match(final[i])!=null){
  3291. cookie_tag_safe[count]=tag_cookie[j].split(',')[0]
  3292. count++
  3293. }
  3294. }
  3295. if(isProhibit==1){
  3296. break;
  3297. }
  3298. }
  3299. }
  3300. if(isProhibit==0){
  3301. fetch("https://www.pixiv.net/ajax/illusts/bookmarks/add",{
  3302. headers: {
  3303. "accept": "application/json",
  3304. "content-type": "application/json; charset=utf-8",
  3305. "x-csrf-token": getCookie('token')
  3306. },
  3307. "referrer": "https://www.pixiv.net",
  3308. 'method':'POST',
  3309. 'body':JSON.stringify({illust_id: id, restrict: 0, comment: "", tags: cookie_tag_safe})//不确定restrict全年龄时的数值
  3310. })
  3311. loveTagView(cookie_tag_safe)
  3312. // event.target.closest('a').nextSibling.outerHTML=`<div class="sc-iasfms-2 eDNlMk"><div class=""><button type="button" class="sc-kgq5hw-0 fgVkZi"><svg viewBox="0 0 32 32" width="32" height="32" class="sc-j89e3c-1 bXjFLc"><path d="M21,5.5 C24.8659932,5.5 28,8.63400675 28,12.5 C28,18.2694439 24.2975093,23.1517313 17.2206059,27.1100183C16.4622493,27.5342993 15.5379984,27.5343235 14.779626,27.110148 C7.70250208,23.1517462 4,18.2694529 4,12.5C4,8.63400691 7.13400681,5.5 11,5.5 C12.829814,5.5 14.6210123,6.4144028 16,7.8282366C17.3789877,6.4144028 19.170186,5.5 21,5.5 Z" style=" fill: rgb(255, 64, 96);"></path><path d="M16,11.3317089 C15.0857201,9.28334665 13.0491506,7.5 11,7.5C8.23857625,7.5 6,9.73857647 6,12.5 C6,17.4386065 9.2519779,21.7268174 15.7559337,25.3646328C15.9076021,25.4494645 16.092439,25.4494644 16.2441073,25.3646326 C22.7480325,21.7268037 26,17.4385986 26,12.5C26,9.73857625 23.7614237,7.5 21,7.5 C18.9508494,7.5 16.9142799,9.28334665 16,11.3317089 Z" class="sc-j89e3c-0 dUurgf" style=" fill: rgb(255, 64, 96);"></path></svg></button></div></div>`
  3313. var button=event.target.closest('a').nextSibling.getElementsByTagName('button')
  3314. if(button.length==0){
  3315. button=event.target.closest('a').nextSibling.nextSibling.getElementsByTagName('button')[0]
  3316. }
  3317. else{
  3318. button=button[0]
  3319. }
  3320. if(button!=null){
  3321. button.childNodes[0].childNodes[0].style.fill='red'
  3322. button.childNodes[0].childNodes[1].style.fill='red'
  3323. }
  3324. }
  3325. else{
  3326. alert('包含屏蔽标签'+isProhibit)
  3327. }
  3328. }
  3329. }
  3330. })
  3331. event.preventDefault()
  3332. }
  3333. if(event.altKey==true&&event.ctrlKey==true){
  3334. // del_element=event.target.closest('a').nextSibling.childNodes[0].childNodes[0].childNodes[0]//预览图中的svg元素(红心)
  3335. // if(del_element.childNodes.length!=4&&del_element.childNodes.length!=5){//判定是否为已经隐私收藏了
  3336.  
  3337. isProhibit=0//0为未屏蔽,1为屏蔽
  3338. var cookie_tag=[]
  3339. id=event.target.src.match(/\d{6,10}/)[0]
  3340. GM_xmlhttpRequest({
  3341. method: "GET",
  3342. url: "https://www.pixiv.net/artworks/"+id,
  3343. headers:{
  3344. "User-Agent": navigator.userAgent,
  3345. },
  3346. onload: function(res) {
  3347. if(res.status === 200){
  3348. //console.log('成功')
  3349. var p=res.responseText
  3350. var final=p.match(/(?<="tag":").*?(?=")/g).toString().split(',')
  3351. // console.log(final)
  3352. if(GM_getValue('tagSave')==''){
  3353. var tag_cookie=tagSave.split('*')
  3354. }
  3355. else{
  3356. tag_cookie=GM_getValue('tagSave').split('*')
  3357. }
  3358. if(GM_getValue('tagProhibit')==''){
  3359. var tag_Prohibit=''
  3360. }
  3361. else{
  3362. tag_Prohibit=GM_getValue('tagProhibit')
  3363. }
  3364. cookie_tag[0]='全部'
  3365. var count=1
  3366. if(getCookie('tagCookieSetting')==1){
  3367. for(var i=0;i<final.length;i++){
  3368. for(var j=0;j<tag_cookie.length;j++){
  3369. if(tag_Prohibit.match(final[i])!=null){
  3370. isProhibit=final[i];
  3371. break;
  3372. }
  3373. if(tag_cookie[j].match(final[i])!=null){
  3374. cookie_tag[count]=tag_cookie[j].split(',')[0]
  3375. count++
  3376. }
  3377. }
  3378. if(isProhibit==1){
  3379. break;
  3380. }
  3381. }
  3382. }
  3383. // if(isProhibit==0){
  3384. fetch("https://www.pixiv.net/ajax/illusts/bookmarks/add",{
  3385. headers: {
  3386. "accept": "application/json",
  3387. "content-type": "application/json; charset=utf-8",
  3388. "x-csrf-token": getCookie('token')
  3389. },
  3390. "referrer": "https://www.pixiv.net",
  3391. 'method':'POST',
  3392. 'body':JSON.stringify({illust_id: id, restrict: 1, comment: "", tags: cookie_tag})
  3393. })
  3394. loveTagView(cookie_tag)
  3395. var button=event.target.closest('a').nextSibling.getElementsByTagName('button')
  3396. if(button.length==0){
  3397. button=event.target.closest('a').nextSibling.nextSibling.getElementsByTagName('button')[0]
  3398. }
  3399. else{
  3400. button=button[0]
  3401. }
  3402. if(button!=null){
  3403. button.childNodes[0].childNodes[0].style.fill='red'
  3404. button.childNodes[0].childNodes[1].style.fill='red'
  3405. var path_3 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  3406. var path_4 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  3407. path_3.setAttribute('d','M29.9796 20.5234C31.1865 21.2121 32 22.511 32 24V28 C32 30.2091 30.2091 32 28 32H21C18.7909 32 17 30.2091 17 28V24C17 22.511 17.8135 21.2121 19.0204 20.5234 C19.2619 17.709 21.623 15.5 24.5 15.5C27.377 15.5 29.7381 17.709 29.9796 20.5234Z')
  3408. path_4.setAttribute('d','M28 22C29.1046 22 30 22.8954 30 24V28C30 29.1046 29.1046 30 28 30H21 C19.8954 30 19 29.1046 19 28V24C19 22.8954 19.8954 22 21 22V21C21 19.067 22.567 17.5 24.5 17.5 C26.433 17.5 28 19.067 28 21V22ZM23 21C23 20.1716 23.6716 19.5 24.5 19.5C25.3284 19.5 26 20.1716 26 21V22H23 V21Z')
  3409. path_3.setAttribute('fill','white')
  3410. path_4.setAttribute('fill','black')
  3411. button.childNodes[0].appendChild(path_3)
  3412. button.childNodes[0].appendChild(path_4)
  3413. }
  3414. // }
  3415. // else{
  3416. if(isProhibit!=0){
  3417. alert('包含屏蔽标签'+isProhibit)
  3418. }
  3419. // }
  3420. }
  3421. }
  3422. })
  3423. getFinalUrl(1,event,getPageNum(event,0))
  3424. event.preventDefault()
  3425. // }
  3426. }
  3427. if(event.altKey!=true&&event.ctrlKey!=true&&event.target.closest('svg')!=null&&event.target.closest('button')!=null){
  3428. isProhibit=0//0为未屏蔽,1为屏蔽
  3429. cookie_tag=[]
  3430. id=event.target.closest('button').parentNode.parentNode.previousSibling.href.match(/\d{6,10}/)[0]
  3431. event.preventDefault()
  3432. GM_xmlhttpRequest({
  3433. method: "GET",
  3434. url: "https://www.pixiv.net/artworks/"+id,
  3435. headers:{
  3436. "User-Agent": navigator.userAgent,
  3437. },
  3438. onload: function(res) {
  3439. if(res.status === 200){
  3440. //console.log('成功')
  3441. var p=res.responseText
  3442. var final=p.match(/(?<="tag":").*?(?=")/g).toString().split(',')
  3443. // console.log(final)
  3444. if(GM_getValue('tagSave')==''){
  3445. var tag_cookie=tagSave.split('*')
  3446. }
  3447. else{
  3448. tag_cookie=GM_getValue('tagSave').split('*')
  3449. }
  3450. if(GM_getValue('tagProhibit')==''){
  3451. var tag_Prohibit=''
  3452. }
  3453. else{
  3454. tag_Prohibit=GM_getValue('tagProhibit')
  3455. }
  3456. cookie_tag[0]='全部'
  3457. var count=1
  3458. if(getCookie('tagCookieSetting')==1){
  3459. for(var i=0;i<final.length;i++){
  3460. for(var j=0;j<tag_cookie.length;j++){
  3461. if(tag_Prohibit.match(final[i])!=null){
  3462. isProhibit=final[i];
  3463. break;
  3464. }
  3465. if(tag_cookie[j].match(final[i])!=null){
  3466. cookie_tag[count]=tag_cookie[j].split(',')[0]
  3467. count++
  3468. }
  3469. }
  3470. if(isProhibit==1){
  3471. break;
  3472. }
  3473. }
  3474. }
  3475. // if(isProhibit==0){
  3476. fetch("https://www.pixiv.net/ajax/illusts/bookmarks/add",{
  3477. headers: {
  3478. "accept": "application/json",
  3479. "content-type": "application/json; charset=utf-8",
  3480. "x-csrf-token": getCookie('token')
  3481. },
  3482. "referrer": "https://www.pixiv.net",
  3483. 'method':'POST',
  3484. 'body':JSON.stringify({illust_id: id, restrict: 1, comment: "", tags: cookie_tag})
  3485. })
  3486. loveTagView(cookie_tag)
  3487. var button=event.target.closest('button')
  3488. if(button!=null){
  3489. button.childNodes[0].childNodes[0].style.fill='red'
  3490. button.childNodes[0].childNodes[1].style.fill='red'
  3491. var path_5 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  3492. var path_6 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  3493. path_5.setAttribute('d','M29.9796 20.5234C31.1865 21.2121 32 22.511 32 24V28 C32 30.2091 30.2091 32 28 32H21C18.7909 32 17 30.2091 17 28V24C17 22.511 17.8135 21.2121 19.0204 20.5234 C19.2619 17.709 21.623 15.5 24.5 15.5C27.377 15.5 29.7381 17.709 29.9796 20.5234Z')
  3494. path_6.setAttribute('d','M28 22C29.1046 22 30 22.8954 30 24V28C30 29.1046 29.1046 30 28 30H21 C19.8954 30 19 29.1046 19 28V24C19 22.8954 19.8954 22 21 22V21C21 19.067 22.567 17.5 24.5 17.5 C26.433 17.5 28 19.067 28 21V22ZM23 21C23 20.1716 23.6716 19.5 24.5 19.5C25.3284 19.5 26 20.1716 26 21V22H23 V21Z')
  3495. path_5.setAttribute('fill','white')
  3496. path_6.setAttribute('fill','black')
  3497. button.childNodes[0].appendChild(path_5)
  3498. button.childNodes[0].appendChild(path_6)
  3499. }
  3500. // }
  3501. // else{
  3502. if(isProhibit!=0){
  3503. alert('包含屏蔽标签'+isProhibit)
  3504. }
  3505. // }
  3506. }
  3507. }
  3508. })
  3509. getFinalUrl(1,event,getPageNum(event,0))
  3510. // }
  3511. }
  3512. if(event.ctrlKey==true&&event.shiftKey==true){//直接下载图片
  3513. var down_1=event.target.parentNode.nextSibling.childNodes[1]
  3514. if(down_1!=undefined){
  3515. var down_2=down_1.childNodes[0].innerText
  3516. var html_pid=event.target.src.split("/")[event.target.src.split("/").length-1].split("_")[0]
  3517. GM_xmlhttpRequest({
  3518. method: "GET",
  3519. url: "https://www.pixiv.net/artworks/"+html_pid,
  3520. headers:{
  3521. "User-Agent": navigator.userAgent,
  3522. },
  3523. onload: function(res) {
  3524. if(res.status === 200){
  3525. //console.log('成功')
  3526. var p=res.responseText
  3527. var moe_url1=p.split('"original":"')[1]
  3528. var moe_url2=moe_url1.split('"},"tags":{"')[0]//moe_url1和2根据原始url的前后端框住真实url
  3529. var moe_url_model="https://i.pixiv.re/"+moe_url2.split("i.pximg.net/")[1]//+"@progressive.webp"//https://api.pixiv.moe/image/i.pximg.net/img-original/img/2021/10/14/00/49/28/93428795_p0.png@progressive.webp
  3530. for(var i=0;i<down_2;i++){
  3531. //window.open(moe_url_model.replace(/p\d{1,2}/,"p"+i),"_blank")
  3532. downloadIamge(moe_url_model.replace(/p\d{1,2}/,"p"+i),html_pid+'-'+i)
  3533. }
  3534. //setCookie("pixivid"+lastcookie(),moe_url2.split("https://")[1].split("/img/")[1]+"*"+num_alt,-1)
  3535. }
  3536. }
  3537. })
  3538. }
  3539. else{
  3540. html_pid=event.target.src.split("/")[event.target.src.split("/").length-1].split("_")[0]
  3541. GM_xmlhttpRequest({
  3542. method: "GET",
  3543. url: "https://www.pixiv.net/artworks/"+html_pid,
  3544. headers:{
  3545. "User-Agent": navigator.userAgent,
  3546. },
  3547. onload: function(res) {
  3548. if(res.status === 200){
  3549. //console.log('成功')
  3550. var p=res.responseText
  3551. var moe_url1=p.split('"original":"')[1]
  3552. var moe_url2=moe_url1.split('"},"tags":{"')[0]//moe_url1和2根据原始url的前后端框住真实url
  3553. var moe_url_model="https://i.pixiv.re/"+moe_url2.split("i.pximg.net/")[1]//+"@progressive.webp"//https://api.pixiv.moe/image/i.pximg.net/img-original/img/2021/10/14/00/49/28/93428795_p0.png@progressive.webp
  3554. //window.open(moe_url_model.replace(/p\d{1,2}/,"p"+i),"_blank")
  3555. downloadIamge(moe_url_model.replace(/p\d{1,2}/,"p0"),html_pid)
  3556. //setCookie("pixivid"+lastcookie(),moe_url2.split("https://")[1].split("/img/")[1]+"*"+num_alt,-1)
  3557. }
  3558. }
  3559. })
  3560. }
  3561. event.preventDefault()
  3562. /*
  3563. if(down_1!=undefined){
  3564. var down_2=down_1.childNodes[0].innerText
  3565. var html_pid=event.target.src.split("/")[event.target.src.split("/").length-1].split("_")[0]
  3566. for(var img_num=1;img_num<=down_2;img_num++){
  3567. //downlad_img("https://pixiv.re/"+html_pid+"-"+img_num+".png")
  3568. downloadIamge("https://pixiv.re/"+html_pid+"-"+img_num+".png",html_pid+"_"+(img_num-1))
  3569. }
  3570. }
  3571. else{
  3572. html_pid=event.target.src.split("/")[event.target.src.split("/").length-1].split("_")[0]
  3573. downloadIamge("https://pixiv.re/"+html_pid+".png",html_pid+"_0")
  3574. }
  3575. */
  3576. }
  3577. // if(event.ctrlKey!=true&&event.altKey!=true&&event.shiftKey!=true&&event.target.closest('button')!=null&&event.target.closest('button').className=='sc-kgq5hw-0 fgVkZi'){//原页面收藏按钮的button祖先节点
  3578.  
  3579. // }
  3580. }
  3581. }
  3582. });
  3583.  
  3584.  
  3585. //————————————————————————————————————————————————————————————
  3586.  
  3587. var num=0
  3588. //————————————————————————————————创建cookie
  3589. function setCookie(cname,cvalue,exdays){
  3590. var cookie_all=cname
  3591. if(exdays!=-1){
  3592. var d = new Date();
  3593. d.setTime(d.getTime()+(exdays*24*60*60*1000));
  3594. var expires = "expires="+d.toGMTString();
  3595. cookie_all=cname+"="+cvalue+"; "+expires+";path=/"
  3596. }
  3597. else{
  3598. cookie_all=cname+"="+cvalue+"; "+exdays+";path=/"
  3599. }
  3600. document.cookie = cookie_all;
  3601. num=num+1
  3602. }
  3603. //————————————————————————————————调取cookie
  3604. function getCookie(cname){
  3605. var name = cname + "=";
  3606. var ca = document.cookie.split(';');
  3607. for(var i=0; i<ca.length; i++) {
  3608. var c = ca[i].trim();
  3609. if (c.indexOf(name)==0){
  3610. return c.substring(name.length,c.length);
  3611. }
  3612. }
  3613. return "";
  3614. }
  3615. //————————————————————————————————使用cookie
  3616. function checkCookie(){
  3617. window.addEventListener('contextmenu',function (event){
  3618. var el=event.target
  3619. ////////////////////////////////////////////////////////
  3620. for(var i in match_rules){
  3621. var result=el.outerHTML.match(match_rules[i])
  3622. if(result!=null&&result.length>1){
  3623. var url_result=result[1]
  3624. var pid=result[2]
  3625. break
  3626. }
  3627. }
  3628. ///////////////////////////////////////////////////////
  3629. if(event.altKey==true&&event.ctrlKey!=true){
  3630. if(event.target.src!=null){
  3631. getFinalUrl(1,event,getPageNum(event,0))
  3632. }
  3633. num=lastcookie()
  3634. event.preventDefault()
  3635. }
  3636.  
  3637. var user=getCookie("pixivid");
  3638. var x = document.cookie
  3639. })
  3640. //————————————————————————————————
  3641.  
  3642. //获取token
  3643. if(getCookie('token')==""||getCookie('token')=="err"){//对应未抓取token(即当天第一次打开pixiv)和抓取token出现错误
  3644. GM_xmlhttpRequest({
  3645. method: "GET",
  3646. url: "https://www.pixiv.net/",
  3647. headers:{
  3648. "User-Agent": navigator.userAgent,
  3649. },
  3650. onload: function(res) {
  3651. if(res.status === 200){
  3652. //console.log('成功')
  3653. var p=res.responseText
  3654. var token=p.match(/(?<="token":").*?(?=",")/)
  3655. if(token!=null){
  3656. setCookie('token',token[0],-1)//不是err则为成功
  3657. console.log('token:'+token[0])
  3658. }
  3659. else{
  3660. setCookie('token','err',-1)//err代表失败
  3661. console.log('token获取失败')
  3662. }
  3663. }
  3664. }
  3665. })
  3666. }
  3667.  
  3668.  
  3669. window.addEventListener('load',function(event){
  3670. // console.log('a')
  3671. aside("recommend")
  3672. })
  3673.  
  3674.  
  3675. rightButton.addEventListener('mouseenter',()=>{
  3676. elem=getelemt("rightButton")
  3677. elem.style.transform="translateX(20px)"
  3678. })
  3679. rightButton.addEventListener('mouseleave',()=>{
  3680. elem=getelemt("rightButton")
  3681. elem.style.transform="translateX(0px)"
  3682. })
  3683. deleteCookie.addEventListener('mouseenter',()=>{
  3684. elem=getelemt("deleteCookie")
  3685. elem.style.transform="translateX(20px)"
  3686. })
  3687. deleteCookie.addEventListener('mouseleave',()=>{
  3688. elem=getelemt("deleteCookie")
  3689. elem.style.transform="translateX(0px)"
  3690. })
  3691.  
  3692. //——————————————————————————————————————————————————————
  3693.  
  3694. morefunction.addEventListener('mouseenter',()=>{
  3695. var elem=getelemt("morefunction")
  3696. elem.style.transform="translateX(20px)"
  3697. })
  3698. morefunction.addEventListener('mouseleave',()=>{
  3699. var elem=getelemt("morefunction")
  3700. elem.style.transform="translateX(0px)"
  3701. })
  3702. No2.addEventListener('click',()=>{
  3703. //————————————————————————————————————————————————————————————————————————————————————————
  3704. user_savepicture()
  3705. })
  3706. var click_num=0
  3707. var w=1
  3708. morefunction.addEventListener('click',()=>{
  3709. if(document.getElementById("slider").style.display=="block"){
  3710. slider.style.opacity="0"
  3711. slider_box.style.opacity="0"
  3712. setTimeout(function () {
  3713. slider.style.display="none"
  3714. }, 250);
  3715. setTimeout(function () {
  3716. slider_box.style.display="none"
  3717. }, 250);
  3718. }
  3719. if(document.getElementById("check").style.display=='block'){
  3720. var check=document.getElementById('check')
  3721. var checkInput=document.getElementById('checkInput')
  3722. check.style.opacity=0
  3723. checkInput.style.opacity=0
  3724. setTimeout(function () {
  3725. check.style.display='none'
  3726. checkInput.style.display='none'
  3727. }, 210)
  3728. }
  3729. w=Math.pow(-1, click_num)
  3730. var elem_1=getelemt("No1")
  3731. var elem_2=getelemt("No2")
  3732. var elem_3=getelemt("No3")
  3733. var elem_4=getelemt("No4")
  3734. var elem_5=getelemt("No5")
  3735. var elem_6=getelemt("No6")
  3736. var elem_7=getelemt("No7")
  3737. var elem_8=getelemt("No8")
  3738. var elem_9=getelemt("No9")
  3739. var elem_10=getelemt("No10")
  3740. var elem_11=getelemt("No11")
  3741. var elem_12=getelemt("No12")
  3742. var elem_13=getelemt("No13")
  3743. var elem=getelemt("morefunction")
  3744. elem.style.transform="translateX(20px)"
  3745. if(w>0){
  3746. elem_1.style.opacity="0.25"
  3747. elem_2.style.opacity="0.20"
  3748. elem_3.style.opacity="0.20"
  3749. elem_4.style.opacity="0.20"
  3750. elem_5.style.opacity="0.20"
  3751. elem_6.style.opacity="0.20"
  3752. elem_7.style.opacity="0.20"
  3753. elem_8.style.opacity="0.20"
  3754. elem_9.style.opacity="0.20"
  3755. elem_10.style.opacity="0.20"
  3756. elem_11.style.opacity="0.20"
  3757. elem_12.style.opacity="0.20"
  3758. elem_13.style.opacity="0.20"
  3759.  
  3760. elem_1.style.transform="rotate(67deg) translateX(98px)"
  3761. elem_2.style.transform="rotate(-16deg) translateX(91px)"
  3762. elem_3.style.transform="rotate(41deg) translateX(86px)"
  3763. elem_4.style.transform="rotate(47deg) translateX(132px)"
  3764. elem_5.style.transform="rotate(-46deg) translateX(143px)"
  3765. elem_6.style.transform="rotate(68deg) translateX(141px)"
  3766. elem_7.style.transform="rotate(10deg) translateX(83px)"
  3767. elem_8.style.transform="rotate(1deg) translateX(130px)"
  3768. elem_9.style.transform="rotate(-68deg) translateX(146px)"
  3769. elem_10.style.transform="rotate(-23deg) translateX(135px)"
  3770. elem_11.style.transform="rotate(-42deg) translateX(96px)"
  3771. elem_12.style.transform="rotate(25deg) translateX(128px)"
  3772. elem_13.style.transform="rotate(-65deg) translateX(105px)"
  3773. click_num++
  3774. }
  3775. else if(w<0){
  3776. elem_1.style.opacity="0"
  3777. elem_2.style.opacity="0"
  3778. elem_3.style.opacity="0"
  3779. elem_4.style.opacity="0"
  3780. elem_5.style.opacity="0"
  3781. elem_6.style.opacity="0"
  3782. elem_7.style.opacity="0"
  3783. elem_8.style.opacity="0"
  3784. elem_9.style.opacity="0"
  3785. elem_10.style.opacity="0"
  3786. elem_11.style.opacity="0"
  3787. elem_12.style.opacity="0"
  3788. elem_13.style.opacity="0"
  3789. elem_1.style.transform="rotate(0deg) translateX(0px)"
  3790. elem_2.style.transform="rotate(0deg) translateX(0px)"
  3791. elem_3.style.transform="rotate(0deg) translateX(0px)"
  3792. elem_4.style.transform="rotate(0deg) translateX(0px)"
  3793. elem_5.style.transform="rotate(0deg) translateX(0px)"
  3794. elem_6.style.transform="rotate(0deg) translateX(0px)"
  3795. elem_7.style.transform="rotate(0deg) translateX(0px)"
  3796. elem_8.style.transform="rotate(0deg) translateX(0px)"
  3797. elem_9.style.transform="rotate(0deg) translateX(0px)"
  3798. elem_10.style.transform="rotate(0deg) translateX(0px)"
  3799. elem_11.style.transform="rotate(0deg) translateX(0px)"
  3800. elem_12.style.transform="rotate(0deg) translateX(0px)"
  3801. elem_13.style.transform="rotate(0deg) translateX(0px)"
  3802. click_num++
  3803. }
  3804. })
  3805. var click_num_1=0
  3806. var v=1
  3807. No3.addEventListener('click',()=>{
  3808. if(document.getElementById("slider").style.display=="block"){
  3809. slider.style.opacity="0"
  3810. slider_box.style.opacity="0"
  3811. setTimeout(function () {
  3812. slider.style.display="none"
  3813. }, 250);
  3814. setTimeout(function () {
  3815. slider_box.style.display="none"
  3816. }, 250);
  3817. }
  3818. if(document.getElementById("check").style.display=='block'){
  3819. var check=document.getElementById('check')
  3820. var checkInput=document.getElementById('checkInput')
  3821. check.style.opacity=0
  3822. checkInput.style.opacity=0
  3823. setTimeout(function () {
  3824. check.style.display='none'
  3825. checkInput.style.display='none'
  3826. }, 210)
  3827. }
  3828. v=Math.pow(-1, click_num_1)
  3829. click_num_1++
  3830. var elem_1=document.getElementsByTagName("cookie_text")[0]
  3831. var elem_2=document.getElementsByTagName("text_background")[0]
  3832. var elem_3=document.getElementsByTagName("black_cover")[0]
  3833. var elem_7=document.getElementsByTagName("cover_title")[0]
  3834. var elem_12=document.getElementsByTagName("page_number")[0]
  3835. var elem_8=getelemt("bigeye")
  3836. var elem_10=getelemt("whitecover")
  3837. var elem_11=getelemt("pages")
  3838. //——————————————————————————————————————————————————————————可以设为函数
  3839. var cookie_split=document.cookie.split(";")
  3840. var cookie_txt=""
  3841. var p=0
  3842. for(var k=0;k<cookie_split.length;k++){
  3843. var cookie_match=cookie_split[k].match("pixivid")
  3844. if(cookie_match!=null){
  3845. var cookie_url=cookie_match.input.split("=")[1]
  3846. var cookie_url_split=cookie_url.split(",")
  3847. var cookie_url_recombine=cookie_url_split[0]
  3848. var new_occup=1
  3849. if(cookie_url.substr(cookie_url.length-1,1)!=","){
  3850. new_occup=0
  3851. }
  3852. for(y=1;y<cookie_url_split.length-new_occup;y++){
  3853. cookie_url_recombine=cookie_url_recombine+"\n"+cookie_url_split[y]
  3854. }
  3855. if(cookie_txt!=null){
  3856. cookie_txt=cookie_txt+cookie_url_recombine+"\n"
  3857. p++
  3858. }
  3859. else{
  3860. cookie_txt=cookie_url_recombine+"\n"
  3861. }
  3862. event.preventDefault()
  3863. }
  3864. }
  3865. for(var f=0;k<cookie_split.length;k++){
  3866. cookie_match=cookie_split[k].match("pixivid")
  3867. if(cookie_match!=null){
  3868. cookie_url=cookie_match.input.split("=")[1]
  3869. cookie_url_split=cookie_url.split(",")
  3870. cookie_url_recombine=cookie_url_split[0]
  3871. for(var y=1;y<cookie_url_split.length;y++){
  3872. cookie_url_recombine=cookie_url_recombine+"\n"+cookie_url_split[y]
  3873. }
  3874. if(cookie_txt!=null){
  3875. cookie_txt=cookie_txt+cookie_url_recombine+"\n"
  3876. p++
  3877. }
  3878. else{
  3879. cookie_txt=cookie_url_recombine+"\n"
  3880. }
  3881. event.preventDefault()
  3882. }
  3883. }
  3884. var userurl_cookie=getCookie("user_url").split(",")[0]
  3885. for(var m=1;m<getCookie("user_url").split(",").length-1;m++){
  3886. userurl_cookie=userurl_cookie+"\n"+getCookie("user_url").split(",")[m]
  3887. }
  3888. if(cookie_txt!="undefined"){
  3889. cookie_txt=cookie_txt+userurl_cookie
  3890. }
  3891. var cookie_txt_num=0
  3892. for(var nn=0;nn<cookie_txt.split("\n").length;nn++){
  3893. if(cookie_txt.split("\n")[nn]!=""){
  3894. cookie_txt_num=cookie_txt_num+1
  3895. }
  3896. }
  3897. if(cookie_txt==""){
  3898. elem_1=document.getElementsByTagName("cookie_text")[0]
  3899. elem_1.style.fontSize="30px"
  3900. cookie_txt="\n\n\\アッカリ~ン/"
  3901. }
  3902. //————————————————————————————————————————————————
  3903. if(cookie_txt!="\n\n\\アッカリ~ン/"){
  3904. var visual_id=cookie_txt.split("\n")
  3905. var visual_id_new=[]//把visual_id中的多张图片链接分开,方便后面使用
  3906. var count=0
  3907. for(var o=0;o<visual_id.length;o++){
  3908. for(var q=0;q<parseInt(visual_id[o].split("*")[1]);q++){
  3909. if(visual_id[o].split("*")[1]!=1){
  3910. visual_id_new[count]=visual_id[o].split("*")[0].match(/\d{6,10}/)+"-"+(q+1)//后面要跟完全分开的visual_id
  3911. count++
  3912. }
  3913. else{
  3914. visual_id_new[count]=visual_id[o].split("*")[0].match(/\d{6,10}/)//后面要跟完全分开的visual_id
  3915. count++
  3916. }
  3917. }
  3918. }
  3919. for(var i=0;i<visual_id_new.length;i++){
  3920. var insideText=document.createElement("text"+[i])
  3921. insideText.style.fontSize="15px"
  3922. insideText.className="insideText"
  3923. insideText.style.opacity="1"
  3924. insideText.style.transform="translateX(350px)"
  3925. insideText.innerText=visual_id_new[i]+"\n"
  3926. insideText.id="insideText"
  3927. elem_1.appendChild(insideText)
  3928. }
  3929. if(document.getElementById("text").innerText.match("\アッカリ~ン/")==null){
  3930. for(var j=i;j<i+2;j++){
  3931. insideText=document.createElement("text"+[j])
  3932. insideText.style.fontSize="15px"
  3933. insideText.className="insideText"
  3934. insideText.style.opacity="1"
  3935. insideText.style.transform="translateX(350px)"
  3936. insideText.innerText="\n"
  3937. insideText.id="insideText"
  3938. elem_1.appendChild(insideText)
  3939. }
  3940. }
  3941. }
  3942. else{
  3943. elem_1.innerText=cookie_txt
  3944. }
  3945. //————————————————————————————————————————————————
  3946. if(document.getElementById("text").innerText.match("\アッカリ~ン/")==null){
  3947. elem_12.innerText=parseInt(document.getElementsByClassName("insideText").length)-2
  3948. }
  3949. else{
  3950. elem_12.innerText=parseInt(document.getElementsByClassName("insideText").length)
  3951. }
  3952. if(v>0){
  3953. elem_1.style.opacity="1"
  3954. elem_1.style.transform="translateX(350px)"
  3955. elem_10.style.opacity="1"
  3956. elem_10.style.transform="translateX(300px)"
  3957. elem_2.style.transform="translateX(160px)"
  3958. elem_3.style.display="block"
  3959. setTimeout(function () {
  3960. elem_3.style.opacity="0.3"
  3961. }, 0.1);
  3962. elem_7.style.left="6%"
  3963. elem_7.style.opacity="1"
  3964. elem_8.style.transform="translateX(191px)"
  3965. elem_8.style.opacity="1"
  3966. elem_11.style.transform="translateX(443px)"
  3967. elem_11.style.opacity="1"
  3968. elem_12.style.transform="translateX(462px)"
  3969. elem_12.style.opacity="1"
  3970. var elem_4=getelemt("No1")
  3971. var elem_5=getelemt("No2")
  3972. var elem_6=getelemt("No3")
  3973. var elem_13=getelemt("No4")
  3974. var elem_14=getelemt("No5")
  3975. var elem_15=getelemt("No6")
  3976. var elem_16=getelemt("No7")
  3977. var elem_17=getelemt("No8")
  3978. var elem_18=getelemt("No9")
  3979. var elem_19=getelemt("No10")
  3980. var elem_20=getelemt("No11")
  3981. var elem_21=getelemt("No12")
  3982. var elem_22=getelemt("No13")
  3983. var elem=getelemt("morefunction")
  3984.  
  3985. elem_4.style.opacity="0"
  3986. elem_5.style.opacity="0"
  3987. elem_6.style.opacity="0"
  3988. elem_13.style.opacity="0"
  3989. elem_14.style.opacity="0"
  3990. elem_15.style.opacity="0"
  3991. elem_16.style.opacity="0"
  3992. elem_17.style.opacity="0"
  3993. elem_18.style.opacity="0"
  3994. elem_19.style.opacity="0"
  3995. elem_20.style.opacity="0"
  3996. elem_21.style.opacity="0"
  3997. elem_22.style.opacity="0"
  3998. elem_4.style.transform="rotate(0deg) translateX(-10px)"
  3999. elem_5.style.transform="rotate(0deg) translateX(-10px)"
  4000. elem_6.style.transform="rotate(0deg) translateX(-10px)"
  4001. elem_13.style.transform="rotate(0deg) translateX(-10px)"
  4002. elem_14.style.transform="rotate(0deg) translateX(-10px)"
  4003. elem_15.style.transform="rotate(0deg) translateX(-10px)"
  4004. elem_16.style.transform="rotate(0deg) translateX(-10px)"
  4005. elem_17.style.transform="rotate(0deg) translateX(-10px)"
  4006. elem_18.style.transform="rotate(0deg) translateX(-10px)"
  4007. elem_19.style.transform="rotate(0deg) translateX(-10px)"
  4008. elem_20.style.transform="rotate(0deg) translateX(-10px)"
  4009. elem_21.style.transform="rotate(0deg) translateX(-10px)"
  4010. elem_22.style.transform="rotate(0deg) translateX(-10px)"
  4011.  
  4012. click_num++
  4013. }
  4014. else{
  4015. elem_1.style.opacity=".0"
  4016. elem_1.style.transform="translateX(0px)"
  4017. elem_1.style.fontSize="15px"
  4018. elem_10.style.opacity=".0"
  4019. elem_10.style.transform="translateX(0px)"
  4020. elem_2.style.opacity=".0"
  4021. elem_2.style.transform="translateX(0px)"
  4022. elem_3.style.opacity=".0"
  4023. setTimeout(function () {
  4024. elem_3.style.display="none"
  4025. }, 300);
  4026. elem_7.style.left="-360px"
  4027. elem_7.style.opacity="0"
  4028. elem_8.style.transform="translateX(0px)"
  4029. elem_8.style.opacity="0"
  4030. elem_11.style.transform="translateX(0px)"
  4031. elem_11.style.opacity="0"
  4032. elem_12.style.transform="translateX(0px)"
  4033. elem_12.style.opacity="0"
  4034. elem_1.innerText=""
  4035. }
  4036. })
  4037. var textPart=document.getElementById("text")
  4038. textPart.addEventListener('click',function(event){
  4039. if(event.target.localName.match(/text\d{1,3}/)!=null){
  4040. var textLink="https://www.pixiv.net/artworks/"+event.target.innerText.match(/\d{6,10}/)[0]
  4041. window.open(textLink)
  4042. }
  4043. })
  4044. No4.addEventListener('contextmenu',()=>{
  4045. retract()
  4046. event.preventDefault()
  4047. })
  4048. document.getElementsByTagName("black_cover")[0].addEventListener('click',()=>{
  4049. var elem_1=document.getElementsByTagName("cookie_text")[0]
  4050. var elem_2=document.getElementsByTagName("text_background")[0]
  4051. var elem_3=document.getElementsByTagName("black_cover")[0]
  4052. var elem_7=document.getElementsByTagName("cover_title")[0]
  4053. var elem_8=getelemt("bigeye")
  4054. var elem_10=getelemt("whitecover")
  4055. var elem_11=getelemt("pages")
  4056. var elem_12=document.getElementsByTagName("page_number")[0]
  4057. elem_1.style.opacity=".0"
  4058. elem_1.style.transform="translateX(0px)"
  4059. elem_1.style.fontSize="15px"
  4060. elem_10.style.opacity=".0"
  4061. elem_10.style.transform="translateX(0px)"
  4062. elem_2.style.opacity=".0"
  4063. elem_2.style.transform="translateX(0px)"
  4064. elem_3.style.opacity=".0"
  4065. setTimeout(function () {
  4066. elem_3.style.display="none"
  4067. }, 300);
  4068. elem_7.style.left="-360px"
  4069. elem_7.style.opacity="0"
  4070. elem_8.style.transform="translateX(0px)"
  4071. elem_8.style.opacity="0"
  4072. elem_11.style.transform="translateX(0px)"
  4073. elem_11.style.opacity="0"
  4074. elem_12.style.transform="translateX(0px)"
  4075. elem_12.style.opacity="0"
  4076. click_num_1++
  4077. elem_1.innerText=""
  4078. })
  4079.  
  4080.  
  4081. // 搜索页快捷键翻页
  4082. window.addEventListener('keydown',function(event){
  4083. if(window.location.href.match(/\/tags\//)!=null){
  4084. var clickNum=document.querySelectorAll(".fuSMYC")//获取除已选页数以外的页数按钮
  4085. if(event.keyCode=="37"&&clickNum[0].hidden==false){//判断左翻页按钮是否隐藏
  4086. clickNum[0].click()
  4087. }
  4088. else if(event.keyCode=="39"&&clickNum[1].hidden==false){//判断右翻页按钮是否隐藏
  4089. clickNum[1].click()
  4090. }
  4091. }
  4092. })
  4093.  
  4094.  
  4095. rightButton.addEventListener('click',()=>{
  4096. var cookie_split=document.cookie.split(";")
  4097. var cookie_txt
  4098. var p=0
  4099. //————————————————————————————————从cookie中匹配pixivid相关cookie
  4100. for(var k=0;k<cookie_split.length;k++){
  4101. var cookie_match=cookie_split[k].match("pixivid")
  4102. if(cookie_match!=null){
  4103. var cookie_url=cookie_match.input.split("=")[1]
  4104. var cookie_url_split=cookie_url.split(",")
  4105. var cookie_url_recombine=cookie_url_split[0]
  4106. var new_occup=1
  4107. if(cookie_url.substr(cookie_url.length-1,1)!=","){
  4108. new_occup=0
  4109. }
  4110. for(var y=1;y<cookie_url_split.length-new_occup;y++){
  4111. cookie_url_recombine=cookie_url_recombine+"\n"+cookie_url_split[y]
  4112. }
  4113. if(cookie_txt!=null){
  4114. cookie_txt=cookie_txt+cookie_url_recombine+"\n"
  4115. p++
  4116. }
  4117. else{
  4118. cookie_txt=cookie_url_recombine+"\n"
  4119. }
  4120. event.preventDefault()
  4121. }
  4122. }
  4123. var userurl_cookie=""
  4124. if(getCookie("user_url")!=""){
  4125. userurl_cookie=getCookie("user_url").split(",")[0]
  4126. for(var m=1;m<getCookie("user_url").split(",").length-1;m++){
  4127. userurl_cookie=userurl_cookie+"\n"+getCookie("user_url").split(",")[m]
  4128. }
  4129. }
  4130. cookie_txt=cookie_txt+userurl_cookie
  4131. var intercept=cookie_txt
  4132. if(cookie_txt=="undefined"){
  4133. intercept="\\アッカリ~ン/"
  4134. }
  4135. else if(cookie_txt.match("undefined")!=null){
  4136. intercept=cookie_txt.substr(9)
  4137. }
  4138. var intercept_final=""
  4139. if(intercept.split("\n")[intercept.split("\n").length-1]==""){
  4140. var bb=1
  4141. }
  4142. else{
  4143. bb=0
  4144. }
  4145. for(var ic=0;ic<intercept.split("\n").length-bb;ic++){
  4146. if(intercept.split("\n")!=""){
  4147. for(var ie=0;ie<parseInt(intercept.split("\n")[ic].split("*")[1]);ie++){
  4148. if(intercept.split("\n")[ic].split("*")[1]==1){
  4149. if(intercept.split("\n")[ic].match(/\d{4}\/\d{2}/)==null){
  4150. intercept_final=intercept_final+"https://pixiv.re/"+intercept.split("\n")[ic].match(/\d{6,10}/)+".png\n"//注意!不包括moe的情况
  4151. }
  4152. else{//moe形式
  4153. intercept_final=intercept_final+"https://api.pixiv.moe/image/i.pximg.net/img-original/img/"+intercept.split("\n")[ic].split("*")[0]+"\n"//+"@progressive.webp\n"
  4154. }
  4155. }
  4156. else{
  4157. if(intercept.split("\n")[ic].match(/\d{4}\/\d{2}/)==null){
  4158. intercept_final=intercept_final+"https://pixiv.re/"+intercept.split("\n")[ic].match(/\d{6,10}/)+"-"+(ie+1)+".png\n"
  4159. }
  4160. else{
  4161. intercept_final=intercept_final+"https://api.pixiv.moe/image/i.pximg.net/img-original/img/"+intercept.split("\n")[ic].split("*")[0].replace(/(?<=_p)\d{1}/,ie)+"\n"//+"@progressive.webp\n"
  4162. }
  4163. }
  4164. }
  4165. }
  4166. }
  4167. //——————————————————————————————————————————————————————————————————————————11111111111111111
  4168. download("Pixiv Url.txt",intercept_final);
  4169. var count=lastcookie()
  4170. for(var o=0;o<count;o++){
  4171. var pixiv_preurl
  4172. if(pixiv_preurl==null){
  4173. pixiv_preurl=getCookie("pixivid"+o)
  4174. }
  4175. else{
  4176. var occup=""
  4177. if(pixiv_preurl.substr(pixiv_preurl.length-1,1)!=","){
  4178. occup=","
  4179. }
  4180. pixiv_preurl=pixiv_preurl+occup+getCookie("pixivid"+o)
  4181. }
  4182. delCookie("pixivid"+o)
  4183. }
  4184. delCookie("user_url")
  4185. setCookie("pixiv_preurl",pixiv_preurl,-1)
  4186. })
  4187.  
  4188. No5.addEventListener('click',()=>{
  4189. var preCheck=getCookie("preImg")
  4190. var path_color=document.getElementById("path12")
  4191. var pretext="0"
  4192. if(preCheck==""||preCheck=="0"){
  4193. pretext="1"
  4194. path_color.style.fill="#0f0"
  4195. }
  4196. else if(preCheck=="1"){
  4197. pretext="2"
  4198. path_color.style.fill="#00a4ff"
  4199. }
  4200. else if(preCheck=="2"){
  4201. pretext="3"
  4202. path_color.style.fill="#f00"
  4203. }
  4204. else if(preCheck=="3"){
  4205. pretext="0"
  4206. path_color.style.fill="#fff"
  4207. }
  4208. setCookie("preImg",pretext,90)
  4209. })
  4210.  
  4211. No5.addEventListener('contextmenu',function(event){
  4212. if(getCookie('bigGif')!=1){
  4213. setCookie('bigGif',1,90)
  4214. document.getElementById('No5').style.backgroundColor='#f00'
  4215. }
  4216. else{
  4217. setCookie('bigGif',0,90)
  4218. document.getElementById('No5').style.backgroundColor='#000'
  4219. }
  4220. event.preventDefault()
  4221. })
  4222.  
  4223. var No6=document.getElementById("No6")
  4224. var slider_box=document.getElementById("slider_box")
  4225. var slider=document.getElementById("slider")
  4226. No6.addEventListener('click',function(event){
  4227. if(slider.style.display=="block"){
  4228. slider.style.opacity="0"
  4229. slider_box.style.opacity="0"
  4230. setTimeout(function () {
  4231. slider.style.display="none"
  4232. }, 250);
  4233. setTimeout(function () {
  4234. slider_box.style.display="none"
  4235. }, 250);
  4236. }
  4237. else{
  4238. slider.style.display="block"
  4239. slider_box.style.display="block"
  4240. setTimeout(function () {
  4241. slider.style.opacity="1"
  4242. }, 0.1);
  4243. setTimeout(function () {
  4244. slider_box.style.opacity="1"
  4245. }, 0.1);
  4246. }
  4247. if(slider.value!=10){
  4248. slider_box.innerText=slider.value
  4249. slider_box.style.backgroundColor="#cbcbcb"
  4250. }
  4251. else{
  4252. slider_box.innerText="∞"
  4253. slider_box.style.backgroundColor="#f7cbcb"
  4254. }
  4255. slider.oninput=function(){
  4256. if(slider.value!=10){
  4257. slider_box.innerText=slider.value
  4258. slider_box.style.backgroundColor="#cbcbcb"
  4259. }
  4260. else{
  4261. slider_box.innerText="∞"
  4262. slider_box.style.backgroundColor="#f7cbcb"
  4263. }
  4264. setCookie("slider",slider.value,90)
  4265. }
  4266.  
  4267. })
  4268. var No7=document.getElementById("No7")
  4269. No7.addEventListener('click',function(event){
  4270. var path14=document.getElementById("path14")
  4271. if(getCookie("R-18_block")==""||getCookie("R-18_block")=="0"){
  4272. setCookie("R-18_block",1,90)
  4273. path14.style.fill="#f00"
  4274. }
  4275. else if(getCookie("R-18_block")=="1"){
  4276. setCookie("R-18_block",0,90)
  4277. path14.style.fill="#fff"
  4278. }
  4279. })
  4280.  
  4281. /*
  4282. document.getElementById("No8").addEventListener('click',function(e){
  4283. if(getCookie("outUrl")==0){
  4284. setCookie("outUrl",1,90)
  4285. document.getElementById("path15").setAttribute('d',svg_re)
  4286. document.getElementById("path15").style.transform="scale(0.017) translate(-424px, -120px)"
  4287. }
  4288. else if(getCookie("outUrl")==1){
  4289. setCookie("outUrl",2,90)
  4290. document.getElementById("path15").setAttribute('d',svg_moe)
  4291. document.getElementById("path15").style.transform="scale(0.016) translate(-204px, -130px)"
  4292. }
  4293. else if(getCookie("outUrl")==2){
  4294. setCookie("outUrl",0,90)
  4295. document.getElementById("path15").setAttribute('d',svg_cat)
  4296. document.getElementById("path15").style.transform="scale(0.017) translate(-391px, -130px)"
  4297. }
  4298. })
  4299. */
  4300.  
  4301. No4.addEventListener('click',()=>{
  4302. var pid_num=lastcookie()
  4303. delCookie("pixivid"+(pid_num-1))
  4304. })
  4305.  
  4306. No1.addEventListener('click',()=>{
  4307. var pid_num=lastcookie()
  4308. var reply=confirm("是否要清除所有已储存的pixiv图片链接?")
  4309. if(reply==true){
  4310. for(var v=pid_num-1;v>=0;v--){
  4311. var pixiv_preurl
  4312. if(pixiv_preurl==null){
  4313. pixiv_preurl=getCookie("pixivid"+v)
  4314. }
  4315. else{
  4316. var occup=""
  4317. if(pixiv_preurl.substr(pixiv_preurl.length-1,1)!=","){
  4318. occup=","
  4319. }
  4320. pixiv_preurl=pixiv_preurl+occup+getCookie("pixivid"+v)
  4321. }
  4322. delCookie("pixivid"+(v))
  4323. }
  4324. delCookie("user_url")
  4325. setCookie("pixiv_preurl",pixiv_preurl,-1)
  4326. alert_count=0
  4327. }
  4328. })
  4329. }
  4330.  
  4331. var No9=document.getElementById("No9")
  4332. No9.addEventListener('click',function(event){
  4333. var check=document.getElementById("check")
  4334. var checkInput=document.getElementById("checkInput")
  4335. if(check.style.display=='none'||check.style.display==''){
  4336. check.style.display='block'
  4337. checkInput.style.display='block'
  4338. setTimeout(function () {
  4339. check.style.opacity=0.3
  4340. checkInput.style.opacity=1
  4341. }, 210);
  4342. }
  4343. else{
  4344. check.style.opacity=0
  4345. checkInput.style.opacity=0
  4346. setTimeout(function () {
  4347. check.style.display='none'
  4348. checkInput.style.display='none'
  4349. }, 210)
  4350. }
  4351. })
  4352. window.addEventListener('keydown',function(event){//判断是否按下回车,与手动查看标签相关
  4353. var text=document.getElementById("checkInput")
  4354. var textValue=text.value
  4355. if(textValue.match('_')!=null){
  4356. textValue=textValue.split('_')[0]
  4357. }
  4358. if(event.keyCode==13&&window.getSelection()!=null&&(window.getSelection().focusNode.id=='checkInput'||window.getSelection().focusNode.id=='check')&&text.value!=""){//点击是否为回车,分别为判断光标位置是否为空,光标指向的id是否为输入框或输入框外围,输入框内部是否为""
  4359. GM_xmlhttpRequest({
  4360. method: "GET",
  4361. url: "https://www.pixiv.net/artworks/"+textValue,
  4362. headers:{
  4363. "User-Agent": navigator.userAgent,
  4364. },
  4365. onload: function(res) {
  4366. if(res.status === 200){
  4367. //console.log('成功')
  4368. var p=res.responseText
  4369. var b=p.match(/(?<=\"tags\"\:\[)\{.*?(?=\],\"wri)/)[0].split('},{')
  4370. var a=[]
  4371. for(var i=0;i<b.length;i++){
  4372. if(b[i].match(/(?<={\"en\":\").*?(?=\"})/)!=null){
  4373. a[i]=b[i].match(/(?<="tag":").*?(?=","locked)/)[0]+' ('+b[i].match(/(?<={\"en\":\").*?(?=\"})/)[0]+')'
  4374. }
  4375. else{
  4376. a[i]=b[i].match(/(?<="tag":").*?(?=","locked)/)[0]
  4377. }
  4378. }
  4379. var c=''
  4380. for(var j=0;j<a.length;j++){
  4381. if(j!=a.length-1){
  4382. c=c+a[j]+', '
  4383. }
  4384. else{
  4385. c=c+a[j]
  4386. }
  4387. }
  4388. alert(c)
  4389. }
  4390. }
  4391. })
  4392. }
  4393. })
  4394.  
  4395. var No10=document.getElementById('No10')
  4396. No10.addEventListener('click',function(event){
  4397. if(getCookie('tagCookieSetting')==0){
  4398. setCookie('tagCookieSetting',1,90)
  4399. document.getElementById('path18').style.fill='#f00'
  4400. }
  4401. else if(getCookie('tagCookieSetting')==1){
  4402. setCookie('tagCookieSetting',0,90)
  4403. document.getElementById('path18').style.fill='#fff'
  4404. }
  4405. })
  4406.  
  4407. window.addEventListener('contextmenu',function(event){//右键No10触发编辑tagCookie功能
  4408. if(event.target.id=='No10'||event.target.id=='path18'){
  4409. if(document.getElementById('tag_view_out')==null){
  4410. var tag_view_out=document.createElement('a')
  4411. var tag_view_text=document.createElement('textarea')
  4412. tag_view_out.id='tag_view_out'
  4413. tag_view_out.style.backgroundColor='#e5e5e5'
  4414. tag_view_text.id='tag_view_text'
  4415. tag_view_text.style.backgroundColor='#e5e5e5'
  4416. if(getCookie('tagCookieType')==1){//如果代码中已经设置,则设置文本输入框为只读
  4417. tag_view_text.setAttribute("readonly","readonly")
  4418. }
  4419. document.body.appendChild(tag_view_out)
  4420. document.getElementById('tag_view_out').appendChild(tag_view_text)
  4421. if(GM_getValue('tagSaveSafe')!=''){
  4422. tag_view_text.value=GM_getValue('tagSaveSafe')
  4423. }
  4424. else{
  4425. tag_view_text.value='未设置匹配标签'
  4426. }
  4427. if(getCookie('tagCookieType')==1){//如果代码中已经设置,则直接使用代码中的tag匹配正则
  4428. tag_view_text.value=tagSaveSafe
  4429. }
  4430.  
  4431. var help = document.createElementNS("http://www.w3.org/2000/svg", "svg");//正则帮助
  4432. var path_help = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  4433. help.setAttribute("aria-hidden","true");
  4434. help.setAttribute('viewbox', '0 0 24 24');
  4435. help.setAttribute('width', '16px');
  4436. help.setAttribute('height', '16px');
  4437. //叹号
  4438. path_help.setAttribute('d','M512 938.666667c235.648 0 426.666667-191.018667 426.666667-426.666667S747.648 85.333333 512 85.333333 85.333333 276.352 85.333333 512s191.018667 426.666667 426.666667 426.666667z m0 85.333333C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z M520.96 232.106667c-62.293333 0-111.786667 17.92-147.626667 54.613333-36.693333 35.84-54.613333 84.48-54.613333 146.773333h90.453333c0-37.546667 7.68-67.413333 23.04-87.893333 17.066667-23.893333 45.226667-35.84 83.626667-35.84 30.72 0 54.613333 8.533333 71.68 25.6 16.213333 17.066667 24.746667 40.106667 24.746667 69.973333 0 22.186667-7.68 42.666667-23.04 62.293334l-14.506667 16.213333c-52.906667 46.933333-85.333333 81.92-97.28 105.813333-11.093333 22.186667-16.213333 49.493333-16.213333 81.066667v14.506667h91.306666v-14.506667c0-21.333333 4.266667-40.106667 13.653334-57.173333 7.68-15.36 19.626667-29.866667 34.986666-43.52 40.96-34.986667 64.853333-57.173333 72.533334-66.56 20.48-27.306667 31.573333-62.293333 31.573333-104.106667 0-51.2-17.066667-92.16-50.346667-122.026667-34.133333-30.72-78.506667-45.226667-133.973333-45.226666z m-14.506667 499.2c-17.92 0-32.426667 5.12-43.52 17.066666-12.8 11.093333-18.773333 25.6-18.773333 43.52 0 17.066667 5.973333 31.573333 18.773333 43.52 11.093333 11.946667 25.6 17.92 43.52 17.92 17.066667 0 32.426667-5.973333 45.226667-17.066666 11.946667-11.946667 17.92-26.453333 17.92-44.373334 0-17.92-5.973333-32.426667-17.92-43.52-11.946667-11.946667-27.306667-17.066667-45.226667-17.066666z')
  4439. //问号
  4440. path_help.style.transform="scale(0.015)"
  4441. path_help.id='path_help';
  4442. help.appendChild(path_help);
  4443. help.id = 'help';
  4444. document.getElementById("tag_view_out").appendChild(help);
  4445.  
  4446.  
  4447. var spin = document.createElementNS("http://www.w3.org/2000/svg", "svg");//切换按钮
  4448. var path_spin = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  4449. spin.setAttribute("aria-hidden","true");
  4450. spin.setAttribute('viewbox', '0 0 24 24');
  4451. spin.setAttribute('width', '16px');
  4452. spin.setAttribute('height', '16px');
  4453. path_spin.setAttribute('d','M421.12 590.506667L362.666667 648.533333a329.386667 329.386667 0 0 1 23.466666-409.173333 8.533333 8.533333 0 0 0-9.813333-13.226667 310.186667 310.186667 0 0 0-83.2 492.373334L241.92 768a17.066667 17.066667 0 0 0 11.946667 29.013333h179.2a17.066667 17.066667 0 0 0 17.066666-17.066666v-179.2a17.066667 17.066667 0 0 0-29.013333-10.24zM602.88 433.493333L661.333333 375.466667a329.386667 329.386667 0 0 1-21.333333 409.173333 8.533333 8.533333 0 0 0 9.813333 13.226667 310.186667 310.186667 0 0 0 81.066667-492.373334L782.08 256a17.066667 17.066667 0 0 0-11.946667-29.013333h-179.2a17.066667 17.066667 0 0 0-17.066666 17.066666v179.2a17.066667 17.066667 0 0 0 29.013333 10.24z')
  4454. path_spin.style.transform="scale(0.021) rotateZ(-90deg) translate(-880px, -140px)"
  4455. path_spin.id='path_spin';
  4456. spin.appendChild(path_spin);
  4457. spin.id = 'spin';
  4458. document.getElementById("tag_view_out").appendChild(spin);
  4459.  
  4460.  
  4461. var lock = document.createElementNS("http://www.w3.org/2000/svg", "svg");//切换按钮
  4462. var path_lock = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  4463. var div_lock = document.createElement('div')
  4464. div_lock.id='div_lock'
  4465. lock.setAttribute("aria-hidden","true");
  4466. lock.setAttribute('viewbox', '0 0 24 24');
  4467. lock.setAttribute('width', '16px');
  4468. lock.setAttribute('height', '16px');
  4469. if(getCookie('tagCookieType')==0){
  4470. path_lock.setAttribute('d','M11,14.7324356 C11.5978014,14.3866262 12,13.7402824 12,13 C12,11.8954305 11.1045695,11 10,11 C8.8954305,11 8,11.8954305 8,13 C8,13.7402824 8.40219863,14.3866262 9,14.7324356 L9,17 L11,17 L11,14.7324356 Z M13,6 C13,4.34314575 11.6568542,3 10,3 C8.34314575,3 7,4.34314575 7,6 L7,8 L13,8 L13,6 Z M4,8 L4,6 C4,2.6862915 6.6862915,0 10,0 C13.3137085,0 16,2.6862915 16,6 L13,6 L13,8 L17.0049107,8 C18.1067681,8 19,8.90195036 19,10.0085302 L19,17.9914698 C19,19.1007504 18.1073772,20 17.0049107,20 L2.99508929,20 C1.8932319,20 1,19.0980496 1,17.9914698 L1,10.0085302 C1,8.8992496 1.8926228,8 2.99508929,8 L4,8 Z')
  4471. path_lock.id='path_unlock';
  4472. lock.id = 'unlock';
  4473. div_lock.title='正在使用cookie中正则'
  4474. }
  4475. else if(getCookie('tagCookieType')==1){
  4476. path_lock.setAttribute('d','M11,14.7324356 C11.5978014,14.3866262 12,13.7402824 12,13 C12,11.8954305 11.1045695,11 10,11 C8.8954305,11 8,11.8954305 8,13 C8,13.7402824 8.40219863,14.3866262 9,14.7324356 L9,17 L11,17 L11,14.7324356 Z M13,6 C13,4.34314575 11.6568542,3 10,3 C8.34314575,3 7,4.34314575 7,6 L7,8 L13,8 L13,6 Z M4,8 L4,6 C4,2.6862915 6.6862915,0 10,0 C13.3137085,0 16,2.6862915 16,6 L16,8 L17.0049107,8 C18.1067681,8 19,8.90195036 19,10.0085302 L19,17.9914698 C19,19.1007504 18.1073772,20 17.0049107,20 L2.99508929,20 C1.8932319,20 1,19.0980496 1,17.9914698 L1,10.0085302 C1,8.8992496 1.8926228,8 2.99508929,8 L4,8 Z')
  4477. path_lock.id='path_lock';
  4478. lock.id = 'lock';
  4479. div_lock.title='正在使用代码中正则'
  4480. }
  4481. lock.setAttribute('class', 'lock_svg');
  4482. path_lock.setAttribute('class', 'lock_path');
  4483. path_lock.style.transform="scale(0.65)"
  4484. lock.appendChild(path_lock);
  4485. document.getElementById("tag_view_out").appendChild(div_lock);
  4486. div_lock.appendChild(lock)
  4487.  
  4488. var trash = document.createElementNS("http://www.w3.org/2000/svg", "svg");//切换按钮
  4489. var path_trash = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  4490. trash.setAttribute("aria-hidden","true");
  4491. trash.setAttribute('viewbox', '0 0 24 24');
  4492. trash.setAttribute('width', '16px');
  4493. trash.setAttribute('height', '16px');
  4494. path_trash.setAttribute('d','M2,2 L18,2 L18,4 L2,4 L2,2 Z M8,0 L12,0 L14,2 L6,2 L8,0 Z M3,6 L17,6 L16,20 L4,20 L3,6 Z M8,8 L9,8 L9,18 L8,18 L8,8 Z M11,8 L12,8 L12,18 L11,18 L11,8 Z')
  4495. path_trash.style.transform="scale(0.66)"
  4496. path_trash.id='path_trash';
  4497. trash.appendChild(path_trash);
  4498. trash.id = 'trash';
  4499. document.getElementById("tag_view_out").appendChild(trash);
  4500.  
  4501.  
  4502.  
  4503. setTimeout(function () {
  4504. tag_view_out.style.opacity='0.8'
  4505. }, 50);
  4506. }
  4507. else{
  4508. document.getElementById('tag_view_out').style.opacity='0'
  4509. setTimeout(function () {
  4510. document.getElementById('tag_view_out').remove()
  4511. }, 250);
  4512. }
  4513. event.preventDefault()
  4514. }
  4515. })
  4516. window.addEventListener('click',function(event){//若点击了不是编辑tagCookie相关位置则设置cookie,并关闭编辑框
  4517. if(getCookie('tagCookieSetting')==1){
  4518. if(getCookie('tagCookieType')==0){
  4519. if(event.target.id!='tag_view_out'&&event.target.id!='tag_view_text'&&event.target.id!='help'&&event.target.id!='path_help'&&event.target.className.baseVal!='lock_svg'&&event.target.className.baseVal!='lock_path'&&event.target.id!='trash'&&event.target.id!='path_trash'&&document.getElementById('tag_view_text')!=null&&document.getElementById('tag_view_text').value!='未设置匹配标签'){//存cookie
  4520. if(document.getElementById('tag_view_out').style.backgroundColor=='rgb(229, 229, 229)'){//为灰色,即公开收藏标签
  4521. GM_setValue('tagSaveSafe',document.getElementById('tag_view_text').value,90)
  4522. }
  4523. else if(document.getElementById('tag_view_out').style.backgroundColor=='rgb(240, 215, 215)'){
  4524. GM_setValue('tagSave',document.getElementById('tag_view_text').value)
  4525. }
  4526. }
  4527. }
  4528. if(event.target.id!='tag_view_out'&&event.target.id!='tag_view_text'&&event.target.id!='help'&&event.target.id!='path_help'&&event.target.id!='spin'&&event.target.id!='path_spin'&&event.target.className.baseVal!='lock_svg'&&event.target.className.baseVal!='lock_path'&&event.target.id!='trash'&&event.target.id!='path_trash'&&document.getElementById('tag_view_text')!=null&&document.getElementById('tag_view_text').value!='未设置匹配标签'){//关闭输入栏
  4529. document.getElementById('tag_view_out').style.opacity='0'
  4530. setTimeout(function () {
  4531. document.getElementById('tag_view_out').remove()
  4532. }, 250);
  4533. }
  4534. if(event.target.id=='help'||event.target.id=='path_help'){//点击问号,触发tagCookie格式
  4535. alert('tagCookie格式\n用"*"分割两个主标签,","分割主标签和其副标签,"|"分割副标签和副标签\n如:“风景,景色|场景*自然,森林|草地|野外”,当遇到作品标签中包含“风景、景色、场景”时,将设置标签为“风景”,包含“自然、森林、草地、野外”时将设置标签为“自然”')
  4536. }
  4537. if(event.target.id=='spin'||event.target.id=='path_spin'){//
  4538. var spin=document.getElementById('spin')
  4539. if(document.getElementById('tag_view_out').style.backgroundColor=='rgb(229, 229, 229)'){
  4540. spin.style.transform='rotate(360deg)'
  4541. document.getElementById('tag_view_out').style.backgroundColor='#f0d7d7'
  4542. document.getElementById('tag_view_text').style.backgroundColor='#f0d7d7'
  4543. if(getCookie('tagCookieType')==0){
  4544. if(GM_getValue('tagSave')!=''){
  4545. document.getElementById('tag_view_text').value=GM_getValue('tagSave')
  4546. }
  4547. else if(GM_getValue('tagSave')==''){
  4548. document.getElementById('tag_view_text').value='未设置匹配标签'
  4549. }
  4550. }
  4551. else{
  4552. if(getCookie('tagCookieType')==1){
  4553. document.getElementById('tag_view_text').value=tagSave
  4554. }
  4555. else if(getCookie('tagCookieType')==0){
  4556. if(GM_getValue('tagSave')!=''){
  4557. document.getElementById('tag_view_text').value=GM_getValue('tagSave')
  4558. }
  4559. else{
  4560. document.getElementById('tag_view_text').value='未设置匹配标签'
  4561. }
  4562. }
  4563. }
  4564. }
  4565. else if(document.getElementById('tag_view_out').style.backgroundColor=='rgb(240, 215, 215)'){
  4566. spin.style.transform='rotate(0deg)'
  4567. document.getElementById('tag_view_out').style.backgroundColor='#cee0d2'
  4568. document.getElementById('tag_view_text').style.backgroundColor='#cee0d2'
  4569. if(getCookie('tagCookieType')==0){
  4570. if(GM_getValue('tagProhibit')!=''){
  4571. document.getElementById('tag_view_text').value=GM_getValue('tagProhibit')
  4572. }
  4573. else if(GM_getValue('tagProhibit')==''){
  4574. document.getElementById('tag_view_text').value='未设置匹配标签'
  4575. }
  4576. }
  4577. else{
  4578. if(getCookie('tagCookieType')==1){
  4579. document.getElementById('tag_view_text').value=tagProhibit
  4580. }
  4581. else if(getCookie('tagCookieType')==0){
  4582. document.getElementById('tag_view_text').value='未设置匹配标签'
  4583. }
  4584. }
  4585. }
  4586. else if(document.getElementById('tag_view_out').style.backgroundColor=='rgb(206, 224, 210)'){
  4587. spin.style.transform='rotate(0deg)'
  4588. document.getElementById('tag_view_out').style.backgroundColor='#e5e5e5'
  4589. document.getElementById('tag_view_text').style.backgroundColor='#e5e5e5'
  4590. if(getCookie('tagCookieType')==0){
  4591. if(GM_getValue('tagSaveSafe')!=''){
  4592. document.getElementById('tag_view_text').value=GM_getValue('tagSaveSafe')
  4593. }
  4594. else if(GM_getValue('tagSaveSafe')==''){
  4595. document.getElementById('tag_view_text').value='未设置屏蔽词'
  4596. }
  4597. }
  4598. else{
  4599. if(getCookie('tagCookieType')==1){
  4600. document.getElementById('tag_view_text').value=tagSaveSafe
  4601. }
  4602. else if(getCookie('tagCookieType')==0){
  4603. document.getElementById('tag_view_text').value='未设置屏蔽词'
  4604. }
  4605. }
  4606. }
  4607. }
  4608. if(event.target.className.baseVal=='lock_svg'||event.target.className.baseVal=='lock_path'){
  4609. if(event.target.id=='lock'||event.target.id=='path_lock'){
  4610. document.getElementById('path_lock').setAttribute('d','M11,14.7324356 C11.5978014,14.3866262 12,13.7402824 12,13 C12,11.8954305 11.1045695,11 10,11 C8.8954305,11 8,11.8954305 8,13 C8,13.7402824 8.40219863,14.3866262 9,14.7324356 L9,17 L11,17 L11,14.7324356 Z M13,6 C13,4.34314575 11.6568542,3 10,3 C8.34314575,3 7,4.34314575 7,6 L7,8 L13,8 L13,6 Z M4,8 L4,6 C4,2.6862915 6.6862915,0 10,0 C13.3137085,0 16,2.6862915 16,6 L13,6 L13,8 L17.0049107,8 C18.1067681,8 19,8.90195036 19,10.0085302 L19,17.9914698 C19,19.1007504 18.1073772,20 17.0049107,20 L2.99508929,20 C1.8932319,20 1,19.0980496 1,17.9914698 L1,10.0085302 C1,8.8992496 1.8926228,8 2.99508929,8 L4,8 Z')
  4611. setCookie('tagCookieType',0,90)
  4612. document.getElementById('path_lock').id='path_unlock'
  4613. document.getElementById('lock').id='unlock'
  4614. document.getElementById('div_lock').title='正在使用cookie中正则'
  4615. }
  4616. else if(event.target.id=='unlock'||event.target.id=='path_unlock'){
  4617. document.getElementById('path_unlock').setAttribute('d','M11,14.7324356 C11.5978014,14.3866262 12,13.7402824 12,13 C12,11.8954305 11.1045695,11 10,11 C8.8954305,11 8,11.8954305 8,13 C8,13.7402824 8.40219863,14.3866262 9,14.7324356 L9,17 L11,17 L11,14.7324356 Z M13,6 C13,4.34314575 11.6568542,3 10,3 C8.34314575,3 7,4.34314575 7,6 L7,8 L13,8 L13,6 Z M4,8 L4,6 C4,2.6862915 6.6862915,0 10,0 C13.3137085,0 16,2.6862915 16,6 L16,8 L17.0049107,8 C18.1067681,8 19,8.90195036 19,10.0085302 L19,17.9914698 C19,19.1007504 18.1073772,20 17.0049107,20 L2.99508929,20 C1.8932319,20 1,19.0980496 1,17.9914698 L1,10.0085302 C1,8.8992496 1.8926228,8 2.99508929,8 L4,8 Z')
  4618. setCookie('tagCookieType',1,90)
  4619. document.getElementById('path_unlock').id='path_lock'
  4620. document.getElementById('unlock').id='lock'
  4621. document.getElementById('div_lock').title='正在使用代码中正则'
  4622. }
  4623. }
  4624. if(event.target.id=='trash'||event.target.id=='path_trash'){
  4625. var trash_confirm=confirm('是否删除cookie中储存的正则?')
  4626. if(trash_confirm==true){
  4627. GM_setValue('tagSaveSafe','')
  4628. GM_setValue('tagSave','')
  4629. }
  4630. }
  4631. }
  4632. })
  4633.  
  4634.  
  4635. var No11=document.getElementById('No11')
  4636. No11.addEventListener('click',function(event){
  4637. // alert('No11')
  4638. var new_url=[]
  4639. if(window.location.href.match('users')!=null){
  4640. var user_id=window.location.href.match(/\d+/)[0]
  4641. GM_xmlhttpRequest({
  4642. method: "GET",
  4643. url: "https://www.pixiv.net/ajax/user/"+user_id+"/profile/all?lang=zh",
  4644. headers:{
  4645. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52",
  4646. },
  4647. onload: function(res) {
  4648. if(res.status === 200){
  4649. //console.log('成功')
  4650. var p=res.responseText
  4651. var user_illust=p.match(/(?<=\")\d+(?=\":null)/g)
  4652. var urlNum_split=Math.ceil(user_illust.length/100)//判断需要分成多少个100
  4653. for(var i=0;i<urlNum_split;i++){
  4654. new_url[i]='https://www.pixiv.net/ajax/user/'+user_id+'/profile/illusts?'
  4655. if(i!=urlNum_split-1){
  4656. var max=i*100+100
  4657. }
  4658. else{
  4659. max=i*100+user_illust.length-Math.floor(user_illust.length/100)*100
  4660. }
  4661. for(var j=i*100;j<max;j++){
  4662. new_url[i]=new_url[i]+'ids%5B%5D='+user_illust[j]+'&'
  4663. }
  4664. new_url[i]=new_url[i]+'work_category=illustManga&is_first_page=0&lang=zh'
  4665. }
  4666. // console.log(new_url)
  4667. GM_setClipboard(new_url)
  4668.  
  4669.  
  4670. var textFinal=''
  4671. var ppp=0
  4672. for(var o=0;o<new_url.length;o++){
  4673. GM_xmlhttpRequest({
  4674. method: "GET",
  4675. url: new_url[o],
  4676. headers:{
  4677. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52",
  4678. },
  4679. onload: function(res) {
  4680. if(res.status === 200){
  4681. ppp++
  4682. // console.log('成功')
  4683. var p=res.responseText
  4684. var illust_IdPage=p.replace(/","title":".*?"pageCount":/g,'**').match(/\d+\*\*\d+/g)//获取作品id和图片数
  4685. for(var k=0;k<illust_IdPage.length;k++){
  4686. if(illust_IdPage[k].split("**")[1]==1){
  4687. textFinal=textFinal+'https://pixiv.re/'+illust_IdPage[k].split("**")[0]+'.png\n'
  4688. }
  4689. else{
  4690. for(var h=0;h<parseInt(illust_IdPage[k].split("**")[1]);h++){
  4691. textFinal=textFinal+'https://pixiv.re/'+illust_IdPage[k].split("**")[0]+'-'+(h+1)+'.png\n'
  4692. }
  4693. }
  4694. }
  4695. if(ppp==new_url.length){
  4696. // console.log(textFinal)
  4697. download('User Illust.txt',textFinal)
  4698. }
  4699. }
  4700. }
  4701. })
  4702. }
  4703. }
  4704. }
  4705. })
  4706. }
  4707. else{
  4708. alert('请在画师界面使用此功能')
  4709. }
  4710. })
  4711. checkCookie()
  4712.  
  4713. var No12=document.getElementById('No12')
  4714. No12.addEventListener('click',function(e){
  4715. var isR18=0
  4716.  
  4717. var sort_ul=document.createElement('ul')
  4718. sort_ul.id='sort_ul'
  4719. sort_ul.className='sort_ul'
  4720. var sort_ul_out=document.getElementsByClassName('sc-l7cibp-0 juyBTC')[0]//搜索界面“预览图”框架的ul元素的父元素
  4721. sort_ul_out.appendChild(sort_ul)
  4722. if(document.getElementsByClassName('sc-l7cibp-3 gCRmsl')!=null){
  4723. sort_ul_out.insertBefore(sort_ul,document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0])
  4724. }
  4725. document.getElementsByClassName('sc-l7cibp-1 krFoBL')[0].style.display='none'//原本搜索页ul元素
  4726. document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0].style.display='none'//原本页面页码部分(换页)
  4727.  
  4728. var sort_more_out=document.createElement('div')
  4729. sort_more_out.id='sort_more_out'
  4730. sort_ul_out.appendChild(sort_more_out)
  4731.  
  4732. var sort_more_background=document.createElement('div')
  4733. sort_more_background.id='sort_more_background'
  4734. sort_more_out.appendChild(sort_more_background)
  4735.  
  4736. var sort_more_text=document.createElement('div')
  4737. sort_more_text.id='sort_more_text'
  4738. sort_more_text.innerText='查看更多'
  4739. sort_more_background.appendChild(sort_more_text)
  4740.  
  4741. if(window.location.href.match(/mode=safe/)!=null){
  4742. isR18=1//全年龄
  4743. }
  4744. else if(window.location.href.match(/mode=r18/)!=null){
  4745. isR18=2//r18
  4746. }
  4747. else{
  4748. isR18=0//无要求
  4749. }
  4750. var sortTag=window.location.href.match(/(?<=\/tags\/).*?(?=\/)/)
  4751. if(sortTag!=null){
  4752. sortRequest(1,sortTag,false,isR18,0)
  4753. }
  4754.  
  4755. sort_more_background.onclick=function(){
  4756. /*
  4757. var sort_less_length=document.getElementsByClassName('sort_li').length
  4758. var allBookmark_length=allBookmark_split.length
  4759. console.log(allBookmark_split)
  4760. if(sort_less_length<allBookmark_length){
  4761. var length=60
  4762. if(allBookmark_length-sort_less_length<60){
  4763. length=allBookmark_length-sort_less_length
  4764. }
  4765. for(var h=length-1;h>0;h--){
  4766. var sort_info=allBookmark_split[allBookmark_length-sort_less_length-1-(length-1-h)].split(',')
  4767. sort_addillust(sort_info[0],sort_info[1],ssort_search_pageort_info[2],sort_info[3],sort_info[4],sort_info[5],sort_info[6],sort_info[7],sort_info[8],sort_info[9])
  4768. }
  4769. }
  4770. */
  4771. if(window.location.href.match(/mode=safe/)!=null){
  4772. isR18=1//全年龄
  4773. }
  4774. else if(window.location.href.match(/mode=r18/)!=null){
  4775. isR18=2//r18
  4776. }
  4777. else{
  4778. isR18=0//无要求
  4779. }
  4780. sortTag=window.location.href.match(/(?<=\/tags\/).*?(?=\/)/)
  4781. var sort_search_page=parseInt(window.location.href.match(/(?<=\#sort)\d+/)[0])
  4782. sortRequest(sort_search_page+1,sortTag,false,isR18,0)
  4783. }
  4784. })
  4785. No12.addEventListener('contextmenu',function(e){
  4786. console.log('a')
  4787. if(getCookie('singleSort')==0){
  4788. setCookie('singleSort',1,90)
  4789. No12.childNodes[0].setAttribute('fill','red')
  4790. }
  4791. else{
  4792. setCookie('singleSort',0,90)
  4793. No12.childNodes[0].setAttribute('fill','white')
  4794. }
  4795. event.preventDefault()
  4796. })
  4797.  
  4798. var No13=document.getElementById('No13')
  4799. No13.addEventListener('click',function(e){
  4800. if(getCookie("unfold")==0){
  4801. setCookie('unfold',1,90)
  4802. document.getElementById('path21').style.fill='red'
  4803. }
  4804. else{
  4805. setCookie("unfold",0,90)
  4806. document.getElementById('path21').style.fill='white'
  4807. }
  4808. })
  4809. //————————————————————————————————————————————————————————————
  4810.  
  4811. var left_1,top_1
  4812. document.body.addEventListener('mousemove',function(event){
  4813. var pre_check=getCookie("preImg")
  4814. if((pre_check=="1"||pre_check=="2"||pre_check=="3")&&event.ctrlKey!=true){
  4815. var left_1=event.pageX+"px"
  4816. var top_1=event.pageY+"px"
  4817.  
  4818. event.target.addEventListener('mousemove',(event)=>{
  4819. left_1=event.pageX+"px"
  4820. top_1=event.pageY+"px"
  4821. })
  4822.  
  4823. var kid=event.target.innerHTML//
  4824. if(kid==""){
  4825. kid=event.target.parentNode.innerHTML
  4826. }
  4827. var eventt=event.target
  4828. for(var ab=0;ab<10;ab++){
  4829. if(eventt==null){
  4830. break
  4831. }
  4832. else if(eventt.className=="sc-1nhgff6-4 boBnlf"||eventt.className=="sc-l7cibp-1 krFoBL"||eventt.className=="sc-9y4be5-1 jtUPOE"||eventt.className=="sc-1kr69jw-0 hkzusx"||eventt.className=="userImgUl"||eventt.className=="sort_ul"){//分别对应“大图页面画师下方滚动图”,“大图页面图片推荐、主页‘推荐作品’”,“主页除‘推荐作品’以外大部分位置”,更多作者图片ul元素,收藏数排序图片ul元素
  4833. var className=true
  4834. break
  4835. }
  4836. else{
  4837. eventt=eventt.parentNode
  4838. }
  4839. }
  4840. if(kid.match("square1200")!=null&&className!=""||kid.match("custom1200")!=null&&className!=""){
  4841. var url=window.location.href
  4842. if(className==true){
  4843. if(url.match("artwork")!="null"){
  4844. if(event.target.childNodes.length!=0){
  4845. var innerHTML=event.target.childNodes[0].currentSrc
  4846. }
  4847. else{
  4848. innerHTML=event.target.currentSrc
  4849. }
  4850. if(innerHTML!=undefined){
  4851. if(event.target.src!=null){
  4852. if(document.getElementById("bigImg_1")!=null){
  4853. if(event.target.src==same_img){
  4854. var inside=''
  4855. isChangingSrc=0
  4856. }
  4857. else{
  4858. same_img=event.target.src// || event.target.getElementsByTagName('img')[0].src
  4859. inside=event.target.src.match(/\d{4}\/\d{2}\/\d{2}\/\d{2}\/\d{2}\/\d{2}\/\d{6,10}(_p0){0,1}/)[0]
  4860. isChangingSrc=1
  4861. }
  4862. }
  4863. else{
  4864. same_img=event.target.src// || event.target.getElementsByTagName('img')[0].src
  4865. inside=event.target.src.match(/\d{4}\/\d{2}\/\d{2}\/\d{2}\/\d{2}\/\d{2}\/\d{6,10}(_p0){0,1}/)[0]
  4866. isChangingSrc=1
  4867. }
  4868.  
  4869. if(document.getElementById('aaaa')==null&&event.target.nextSibling!=null&&(event.target.nextSibling.tagName=="svg"||event.target.innerHTML.match('sc-192k5ld-0 etaMpt sc-rp5asc-8 kSDUsv')!=null)){//gif暂停按钮的className
  4870. //innerHTML="https://api.moedog.org/pixiv/interface/PixivProxy.php?url=https://i.pximg.net/c/540x540_70/img-master/img/"+inside+"_master1200.jpg"
  4871. innerHTML="https://i.pximg.net/c/540x540_70/img-master/img/"+inside+"_master1200.jpg"
  4872. var type='img'
  4873. if(getCookie('bigGif')==1){//动图预览开启
  4874. type='gif'
  4875. }
  4876. if(document.getElementById('bigImg_1')==null){
  4877. addImg(top_1,left_1,innerHTML,event,type,isChangingSrc)
  4878. }
  4879. else{
  4880. addImg(top_1,left_1,innerHTML,event,type,isChangingSrc)
  4881. }
  4882. }
  4883. //——————
  4884. else{
  4885. if(getCookie("preImg")=="2"){
  4886. //innerHTML="https://api.moedog.org/pixiv/interface/PixivProxy.php?url=https://i.pximg.net/c/540x540_70/img-master/img/"+inside+"_master1200.jpg"
  4887. innerHTML="https://i.pximg.net/c/540x540_70/img-master/img/"+inside+"_master1200.jpg"
  4888. }
  4889. else if(getCookie("preImg")=="3"){
  4890. //innerHTML="https://api.moedog.org/pixiv/interface/PixivProxy.php?url=https://i.pximg.net/img-master/img/"+inside+"_master1200.jpg"
  4891. innerHTML="https://i.pximg.net/img-master/img/"+inside+"_master1200.jpg"
  4892. }
  4893. addImg(top_1,left_1,innerHTML,event,'img',isChangingSrc)
  4894. if(getCookie("preImg")=="3"){
  4895. pictureSize(document.getElementById("bigImg_1"))
  4896. }
  4897. }
  4898. }
  4899. }
  4900. }
  4901. }
  4902. }
  4903. }
  4904. else if(getCookie("preImg")=="0"&&document.getElementById('occupy')==null&&event.target.tagName=='IMG'&&(event.target.src.match("square1200")||event.target.src.match("custom1200"))){
  4905. var occupy=document.createElement('occupy')
  4906. occupy.id='occupy'
  4907. occupy.innerText=event.target.src
  4908. occupy.style.display='none'
  4909. document.body.appendChild(occupy)
  4910. }
  4911. })
  4912. document.body.addEventListener('mousemove',function(event){
  4913. var eventT=event.target
  4914. if(eventT.tagName!='UL'&&eventT.tagName!='SECTION'){
  4915. var eventT_ul=eventT.closest('ul')
  4916. }
  4917. else{
  4918. ab=false
  4919. }
  4920. if(eventT_ul!=null){
  4921. if(ab!=false&&eventT_ul!=null&&(eventT_ul.className=="sc-iasfms-1 hYfnPb"||eventT_ul.className=="sc-iasfms-3 jDiPOg"||eventT_ul.className=="sc-l7cibp-1 krFoBL"||eventT_ul.className=="sc-1kr69jw-0 hkzusx"||eventT_ul.className=="sc-9y4be5-1 jtUPOE"||eventT_ul.className=='userImgUl'||eventT_ul.className=='sort_ul')){//分别对应“大图片页面下推荐图片部分单个图片”和“主页面部分图片单个图片”、“大图片页面画师信息下滚动部分单个图片”、更多作者图片部分ul元素
  4922. var ab=true
  4923. }
  4924. else{
  4925. ab=false
  4926. }
  4927. }
  4928. else{
  4929. eventT_ul=eventT.closest('NAV')
  4930. if(eventT_ul!=null&&eventT_ul.className=="sc-1nhgff6-3 cAicGw"){//最近的nav元素的className
  4931. ab=true
  4932. }
  4933. else{
  4934. ab=false
  4935. }
  4936. }
  4937. if(ab==false){
  4938. var search=document.getElementById("bigImg")
  4939. if(search==null){
  4940. search=document.getElementById("bigImg_1")
  4941. }
  4942. if(search!=null){
  4943. search.remove()
  4944. }
  4945. if(document.getElementById("occupy")!=null){
  4946. document.getElementById("occupy").remove()
  4947. }
  4948. bigImg_scale=1
  4949. }
  4950. })
  4951. //————————————————————————————————————————————————————
  4952. var bigImg_scale=1
  4953. window.addEventListener('keydown',function(event){
  4954. if((document.getElementById("bigImg_1")!=null||document.getElementById("bigImg")!=null)&&(event.keyCode==187||event.keyCode===188||event.keyCode===189||event.keyCode===190||event.keyCode===87||event.keyCode===65||event.keyCode===83||event.keyCode===68)){
  4955. var preview=document.getElementById("bigImg")
  4956. if(preview==null){
  4957. preview=document.getElementById("bigImg_1")
  4958. }
  4959. var preSrc=preview.src.split(/_p\d{1,3}_/)
  4960. if(preview.src.match(/_p\d{1,3}_/)!=null){
  4961. var preNum=parseInt(preview.src.match(/_p\d{1,3}_/)[0].match(/\d{1,3}/))
  4962. }
  4963. else{
  4964. preNum=-1
  4965. }
  4966. if(event.keyCode==188&&preNum!=-1){
  4967. if(preNum!=0){
  4968. preview.src=preSrc[0]+"_p"+(preNum-1)+"_"+preSrc[1]
  4969. }
  4970. }
  4971. else if(event.keyCode==190&&preNum!=-1){
  4972. preview.src=preSrc[0]+"_p"+(preNum+1)+"_"+preSrc[1]
  4973. }
  4974. else if(event.keyCode==189){//减号键
  4975. if(bigImg_scale!=0.25){
  4976. bigImg_scale=bigImg_scale-0.25
  4977. }
  4978. document.getElementById('bigImg_1').style.transform='scale('+bigImg_scale+')'
  4979. }
  4980. else if(event.keyCode==187){//加号键
  4981. bigImg_scale=bigImg_scale+0.25
  4982. document.getElementById('bigImg_1').style.transform='scale('+bigImg_scale+')'
  4983. }
  4984. else if(event.keyCode==87){//w
  4985. document.getElementById('bigImg_1').style.top=parseInt(document.getElementById('bigImg_1').style.top.match(/\d+/)[0])-20+'px'
  4986. }
  4987. else if(event.keyCode==65){//a
  4988. document.getElementById('bigImg_1').style.left=parseInt(document.getElementById('bigImg_1').style.left.match(/\d+/)[0])-20+'px'
  4989. }
  4990. else if(event.keyCode==83){//s
  4991. document.getElementById('bigImg_1').style.top=parseInt(document.getElementById('bigImg_1').style.top.match(/\d+/)[0])+20+'px'
  4992. }
  4993. else if(event.keyCode==68){//d
  4994. document.getElementById('bigImg_1').style.left=parseInt(document.getElementById('bigImg_1').style.left.match(/\d+/)[0])+20+'px'
  4995. }
  4996. }
  4997.  
  4998. //锚点
  4999. if((document.getElementById('bigImg_1')!=null||document.getElementById('bigImg')!=null||document.getElementById('occupy')!=null)&&event.keyCode==191){
  5000. if(document.getElementById('bigImg_1')!=null){
  5001. var id=document.getElementById('bigImg_1').src.match(/(?<=\/)\d+(?=_)/)//——————————————————————————————————————
  5002. }
  5003. else if(document.getElementById('occupy')!=null){
  5004. id=document.getElementById('occupy').innerText.match(/(?<=\/)\d+(?=_)/)
  5005. }
  5006. if(event.ctrlKey!=true){
  5007. GM_xmlhttpRequest({
  5008. method: "GET",
  5009. url: "https://www.pixiv.net/artworks/"+id,
  5010. headers:{
  5011. "User-Agent": navigator.userAgent,
  5012. },
  5013. onload: function(res) {
  5014. if(res.status === 200){
  5015. //console.log('成功')
  5016. var p=res.responseText
  5017.  
  5018. var ai=''
  5019. if(p.match(/(?<=\"aiType\"\:)\d+/)!=null&&p.match(/(?<=\"aiType\"\:)\d+/)==2){
  5020. ai='AI生成,'
  5021. }
  5022.  
  5023. var b=p.match(/(?<=\"tags\"\:\[)\{.*?(?=\],\"wri)/)[0].split('},{')
  5024. var a=[]
  5025. for(var i=0;i<b.length;i++){
  5026. if(b[i].match(/(?<={\"en\":\").*?(?=\"})/)!=null){
  5027. a[i]=b[i].match(/(?<="tag":").*?(?=","locked)/)[0]+' ('+b[i].match(/(?<={\"en\":\").*?(?=\"})/)[0]+')'
  5028. }
  5029. else{
  5030. a[i]=b[i].match(/(?<="tag":").*?(?=","locked)/)[0]
  5031. }
  5032. }
  5033. var c=''
  5034. for(var j=0;j<a.length;j++){
  5035. if(j!=a.length-1){
  5036. c=c+a[j]+', '
  5037. }
  5038. else{
  5039. c=c+a[j]
  5040. }
  5041. }
  5042. alert("作品标签:\n\n"+ai+c)
  5043. event.preventDefault()
  5044. }
  5045. }
  5046. })
  5047. }
  5048. else{
  5049. GM_xmlhttpRequest({
  5050. method: "GET",
  5051. url: "https://www.pixiv.net/bookmark_add.php?type=illust&illust_id="+id,
  5052. headers:{
  5053. "User-Agent": navigator.userAgent,
  5054. },
  5055. onload: function(res) {
  5056. if(res.status === 200){
  5057. //console.log('成功')
  5058. var p=res.responseText
  5059. var tags=p.match(/(?<=收藏的标签.*?value=\").*?(?=\")/)
  5060. if(tags!=null){
  5061. tags=tags[0]
  5062. }
  5063. if(tags!=''){
  5064. alert("您收藏的标签:\n\n"+tags.replace(/ /g,",").replace(/,$/,''))
  5065. }
  5066. else{
  5067. alert("您尚未收藏此作品")
  5068. }
  5069. event.preventDefault()
  5070. }
  5071. }
  5072. })
  5073. }
  5074. }
  5075.  
  5076. })
  5077. document.getElementById('text').addEventListener('mouseover',function(event){//储存链接栏显示预览图
  5078. visualPic(event)
  5079. })
  5080.  
  5081. window.addEventListener('contextmenu',function(event){//储存链接栏右键删除链接
  5082. if(event.target.className=="insideText"){
  5083. var id=event.target.innerText.match(/\d+/)[0]
  5084. if(getCookie("user_url").match(id)!=null){
  5085. var newCookie=getCookie("user_url").split(id)[0]+getCookie("user_url").split(id)[1].replace(/\*\d+,/,"")
  5086. event.target.remove()
  5087. setCookie("user_url",newCookie,-1)
  5088. }
  5089. else{
  5090. var allCookie=document.cookie
  5091. var cookie_num=allCookie.substr(allCookie.match(id).index-2,1)//获取是第几个pixivid
  5092. event.target.remove()
  5093. delCookie("pixivid"+cookie_num)
  5094. }
  5095. event.preventDefault()
  5096. }
  5097. })
  5098. var add_count=0//用于判断展开user_add还是收回
  5099. document.getElementById("add_cover").addEventListener('click',function(event){
  5100. if(add_count==0){
  5101. var text1=document.createElement("text")
  5102. if(document.getElementsByClassName("sc-mhypg7-1 dmRrjk")[0].innerText=="已关注"&&getCookie("aside").split(",")[0]=="1"){
  5103. text1.innerText="已关注"
  5104. }
  5105. else{
  5106. text1.innerText="隐私关注"
  5107. }
  5108.  
  5109. var add_text_all=document.createElement('div')
  5110. add_text_all.id='add_text_all'
  5111. document.getElementById("div_add").appendChild(add_text_all)
  5112.  
  5113. text1.id="add_text1"
  5114. text1.className="add_text"
  5115. var text2=document.createElement("text")
  5116. text2.id="add_text2"
  5117. text2.className="add_text"
  5118. text2.innerText="相似作者"
  5119. var text3=document.createElement("text")
  5120. text3.id="add_text3"
  5121. text3.className="add_text"
  5122. text3.innerText="黑名单"
  5123. var text4=document.createElement('text')
  5124. text4.id="add_text4"
  5125. text4.className="add_text"
  5126. text4.innerText="作者作品"
  5127.  
  5128. add_text_all.appendChild(text1)
  5129. add_text_all.appendChild(text2)
  5130. add_text_all.appendChild(text3)
  5131. add_text_all.appendChild(text4)
  5132. $("#add").animate({height:"120px",width:"102px",borderRadius:"15px"},100);
  5133. $("#add_cover").animate({height:"120px"},100)
  5134. setTimeout(function () {
  5135. $(".add_text").animate({opacity:"1"},100)
  5136. }, 250);
  5137. document.getElementById("path16").style.transform="scale(0.03) translate(60px, 1320px)"
  5138. add_count=1
  5139. }
  5140. else if(add_count==1){
  5141. $(".add_text").animate({opacity:"0"},100)
  5142. setTimeout(function () {
  5143. $("#add").animate({height:"32px",width:"32px",borderRadius:"16px"},100);
  5144. $("#add_cover").animate({height:"32px"},100)
  5145. document.getElementById("path16").style.transform="scale(0.02) translate(300px, 280px)"
  5146. }, 100);
  5147. setTimeout(function () {
  5148. document.getElementById("add_text1").remove()
  5149. document.getElementById("add_text2").remove()
  5150. document.getElementById("add_text3").remove()
  5151. document.getElementById("add_text4").remove()
  5152. }, 600);
  5153. add_count=0
  5154. }
  5155. })
  5156. window.addEventListener('click',function(event){
  5157. if(event.target.id=="add_text1"){
  5158. var user_id=document.getElementsByTagName("aside")[0].innerHTML.match(/(?<=\/users\/)\d+/)[0]
  5159. fetch("https://www.pixiv.net/bookmark_add.php",{
  5160. headers: {
  5161. "accept": "application/json",
  5162. "content-type": "application/x-www-form-urlencoded; charset=utf-8",
  5163. "x-csrf-token": getCookie('token')
  5164. },
  5165. "referrer": window.location.href,
  5166. 'method':'POST',
  5167. "mode": "cors",
  5168. "credentials": "include",
  5169. body:"mode=add&type=user&user_id="+user_id+"&restrict=1&format=json&tag=[]"
  5170. })
  5171. setCookie("aside","1,"+getCookie("aside").split(",")[1],90)
  5172. event.target.innerText="已关注"
  5173. }
  5174. else if(event.target.id=="add_text2"){
  5175. //var user_recommend_id=document.getElementsByClassName("sc-d98f2c-0 sc-fujyAs eEzOcr")[0].outerHTML.match(/(?<=\/users\/)\d+/)[0]//classname为大图页面上任意一个能够获取到作者id的元素,此处为右侧aside元素中的作者昵称部分
  5176. var user_recommend_id=document.getElementsByTagName('h2')[0]
  5177. if(user_recommend_id.getElementsByTagName('a')[0]!=null){
  5178. user_recommend_id=user_recommend_id.getElementsByTagName('a')[0].href.match(/\d+/)[0]
  5179. }
  5180. GM_xmlhttpRequest({
  5181. method: "GET",
  5182. url: "https://www.pixiv.net/ajax/user/"+user_recommend_id+"/recommends?userNum=20&workNum=3&isR18=true&lang=zh",
  5183. headers:{
  5184. "x-user-id":10000000
  5185. },
  5186. onload: function(res) {
  5187. if(res.status === 200){
  5188. // console.log('成功')
  5189. var p=res.responseText
  5190. var img_url=[]
  5191. var img_href=[]
  5192. var user_id=[]
  5193. var user_img=[]
  5194. var user_name=[]
  5195. var user_href=[]
  5196. var img_url_count=0,img_href_count=0,user_id_count=0,user_img_count=0,user_name_count=0,user_href_count=0
  5197. var q=p.split(",")
  5198. for(var i=0;i<q.length;i++){
  5199. if(q[i].match(/^"urls":\{"250x250"/)!=null){
  5200. img_url[img_url_count]=q[i].substring(q[i].match(/https/).index,q[i].length-1).replace(/\\/g,"")
  5201. img_href[img_href_count]="https://www.pixiv.net/artworks/"+img_url[img_url_count].match(/\d+(?=_p0)/)
  5202. // alert(w[count])
  5203. img_href_count++
  5204. img_url_count++
  5205. }
  5206. else if(q[i].match('"userId":"')!=null){//或许可以只取前20个,但有风险
  5207. if(user_id[user_id_count-1]!=q[i].match(/\d+/)[0]){
  5208. user_id[user_id_count]=q[i].match(/\d+/)[0]
  5209. user_href[user_href_count]="https://www.pixiv.net/users/"+user_id[user_id_count]
  5210. user_href_count++
  5211. user_id_count++
  5212. }
  5213. }
  5214. else if(q[i].match('"userName":"')!=null){
  5215. if(user_name[user_name_count-1]!=eval("'"+q[i].substring(12,q[i].length-1)+"'")){
  5216. user_name[user_name_count]=eval("'"+q[i].substring(12,q[i].length-1)+"'")
  5217. user_name_count++
  5218. }
  5219. }
  5220. else if(q[i].match('"profileImageUrl":"')!=null){
  5221. if(user_img[user_img_count-1]!=q[i].substring(19,q[i].length-2).replace(/\\/g,"")){//数组的最后一位出现了链接最后有一个“\”,导致出现了和上一位一样的链接
  5222. //或许可以直接删掉最后一项(判断user_img_count是否等于20),也可以不管
  5223. user_img[user_img_count]=q[i].substring(19,q[i].length-2).replace(/\\/g,"")
  5224. user_img_count++
  5225. }
  5226. }
  5227. }
  5228. for(var j=0;j<20;j++){
  5229. add_recommend(img_url[j*3],img_href[j*3],img_url[j*3+1],img_href[j*3+1],img_url[j*3+2],img_href[j*3+2],user_img[j],user_name[j],user_id[j],user_href[j],15+j*417)
  5230. //user_pic,user_title_view,user_id,user_url
  5231. }
  5232. document.getElementById("recommend").style.bottom="0px"
  5233. }
  5234. }
  5235. })
  5236. }
  5237. else if(event.target.id=="add_text3"){
  5238. user_recommend_id=document.getElementsByClassName("sc-d98f2c-0 sc-fujyAs eEzOcr")[0].outerHTML.match(/(?<=\/users\/)\d+/)[0]//classname为大图页面上任意一个能够获取到作者id的元素,此处为右侧aside元素中的作者昵称部分
  5239. window.open('https://www.pixiv.net/user_infomsg.php?id='+user_recommend_id,'_blank')
  5240. }
  5241. else if(event.target.id=="add_text4"){
  5242. if(window.location.href.match(/artworks/)!=null){
  5243. userAllPic(0,'')
  5244. }
  5245. }
  5246.  
  5247. if(event.target.className=="js-click-trackable _2Of8xxg"){//未关注时(蓝色)作者关注按钮
  5248. setCookie("aside","0,"+getCookie("aside").split(",")[1],90)
  5249. }
  5250. else if(event.target.className=="js-click-trackable _3LhShlo _2Of8xxg"){//关注时(白色)作者关注按钮
  5251. setCookie("aside","2,"+getCookie("aside").split(",")[1],90)
  5252. }
  5253.  
  5254. })
  5255. document.getElementById("recommend_svg").addEventListener('click',function(e){
  5256. document.getElementById("recommend").style.bottom="-350px"
  5257. })
  5258.  
  5259. window.addEventListener('click',function(e){
  5260. if((e.target.id=='userImg_underImg'||e.target.id=='path_userImg'||e.target.id=='userImgCross')&&document.getElementById('userImgBack')!=null){
  5261. document.getElementById('userImgBack').remove()
  5262. document.getElementById('userImg_underImg').remove()
  5263. }
  5264. if(e.target.className=='userImgPic'){
  5265. window.open(e.target.href,'_blank')
  5266. }
  5267. })
  5268.  
  5269. document.addEventListener('contextmenu',function(event){
  5270. if(event.target.id=='user_svg_background'||event.target.id=='user_svg'){
  5271. if(document.getElementById('user_svg')!=null&&document.getElementById('user_svg').closest('div')!=null){
  5272. var id=document.getElementById('user_svg').closest('div').childNodes[0].href.match(/\d+/)[0]//获取作者id
  5273. userAllPic(1,id)
  5274. event.preventDefault()
  5275. }
  5276. }
  5277. })
  5278.  
  5279.  
  5280. var oldUrl=''
  5281. oldUrl=urlChange(oldUrl)
  5282. window.addEventListener('click',function(e){
  5283. oldUrl=urlChange(oldUrl)
  5284. })
  5285. var all_historyList=0//总共有多少条历史记录
  5286. document.getElementById('deleteCookie').addEventListener('click',function(e){
  5287. if(document.getElementById('history_all')==null){
  5288. var historyAll=document.createElement('div')
  5289. historyAll.id='history_all'
  5290. document.body.appendChild(historyAll)
  5291.  
  5292. var historyBigTitle=document.createElement('a')
  5293. historyBigTitle.id='history_bigTitle'
  5294. historyAll.appendChild(historyBigTitle)
  5295.  
  5296. var historyBigTitleText=document.createElement('text')
  5297. historyBigTitleText.id='history_bigTitleText'
  5298. historyBigTitleText.innerText='历史记录'
  5299. historyBigTitle.appendChild(historyBigTitleText)
  5300.  
  5301. //关闭按钮
  5302. var historyClose = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5303. var pathHistoryClose = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5304. historyClose.setAttribute("aria-hidden","true");
  5305. historyClose.setAttribute('viewbox', '0 0 30 30');
  5306. historyClose.setAttribute('width', '30px');
  5307. historyClose.setAttribute('height', '30px');
  5308. pathHistoryClose.setAttribute('d','M604.16 512l110.08-110.08a64 64 0 0 0-90.24-90.88L512 421.76 403.2 311.04a64 64 0 0 0-90.24 90.88L423.04 512 312.96 622.08a64 64 0 1 0 90.24 90.88L512 602.24l110.08 110.08a64 64 0 0 0 90.24-90.24z')
  5309. pathHistoryClose.style.transform="translate(-3px, -3px) scale(0.036)"
  5310. pathHistoryClose.setAttribute('fill', '#000');
  5311. pathHistoryClose.style.opacity='0.5'
  5312. pathHistoryClose.id='pathHistoryClose'
  5313. historyClose.appendChild(pathHistoryClose);
  5314. historyClose.id = 'history_close';
  5315. historyBigTitle.appendChild(historyClose);
  5316. historyClose.onmouseenter=function(){
  5317. historyClose.style.transform='rotate(180deg)'
  5318. }
  5319. historyClose.onmouseleave=function(){
  5320. historyClose.style.transform='rotate(0deg)'
  5321. }
  5322. historyClose.onclick=function(){
  5323. document.getElementById('history_all').remove()
  5324. }
  5325.  
  5326. //垃圾桶按钮
  5327. var historyClear = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5328. var pathHistoryClearCap = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5329. var pathHistoryClearBox = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5330. historyClear.setAttribute("aria-hidden","true");
  5331. historyClear.setAttribute('viewbox', '0 0 30 30');
  5332. historyClear.setAttribute('width', '30px');
  5333. historyClear.setAttribute('height', '30px');
  5334. pathHistoryClearCap.setAttribute('d','M982.912 118.336H801.28V53.312c0-30.08-22.4-52.48-52.224-52.48h-477.44a51.136 51.136 0 0 0-52.288 52.48v62.528H37.888c-19.904 2.496-37.312 19.968-37.312 40a38.4 38.4 0 0 0 37.312 37.504h947.52a38.4 38.4 0 0 0 37.312-37.504c-2.56-20.032-19.904-37.504-39.808-37.504z')
  5335. pathHistoryClearCap.style.transform="translate(6px, 6px) scale(0.018)"
  5336. pathHistoryClearCap.setAttribute('fill', '#000');
  5337. pathHistoryClearCap.style.opacity='0.5'
  5338. pathHistoryClearCap.style.transition='0.25s'
  5339. pathHistoryClearCap.id='pathHistoryClearCap'
  5340. historyClear.appendChild(pathHistoryClearCap);
  5341. pathHistoryClearBox.setAttribute('d','M838.656 273.28H182.08c-9.92 0-19.84 2.56-24.832 9.984a32.192 32.192 0 0 0-9.984 25.024v605.184c0 59.968 49.792 110.016 109.44 110.016h509.824a110.72 110.72 0 0 0 109.44-110.08V308.416c0-19.968-17.408-35.008-37.312-35.008z m-422.784 582.656a38.4 38.4 0 0 1-37.312 37.504 38.4 38.4 0 0 1-37.312-37.504V460.928a38.4 38.4 0 0 1 37.312-37.568 38.4 38.4 0 0 1 37.312 37.568v395.072z m263.68 0a38.4 38.4 0 0 1-37.376 37.504 38.4 38.4 0 0 1-37.312-37.504V460.928a38.4 38.4 0 0 1 37.312-37.568 38.4 38.4 0 0 1 37.312 37.568v395.072z')
  5342. pathHistoryClearBox.style.transform="translate(6px, 6px) scale(0.018)"
  5343. pathHistoryClearBox.setAttribute('fill', '#000');
  5344. pathHistoryClearBox.style.opacity='0.5'
  5345. pathHistoryClearBox.id='pathHistoryClearBox'
  5346. historyClear.appendChild(pathHistoryClearBox);
  5347. historyClear.id = 'history_clear';
  5348. historyBigTitle.appendChild(historyClear);
  5349. historyClear.onmouseenter=function(){
  5350. pathHistoryClearCap.style.transform='translate(6px, 2px) scale(0.018)'
  5351. }
  5352. historyClear.onmouseleave=function(){
  5353. pathHistoryClearCap.style.transform='translate(6px, 6px) scale(0.018)'
  5354. }
  5355. historyClear.onclick=function(){
  5356. var clear=confirm('是否要清空全部历史记录')
  5357. if(clear==true){
  5358. GM_setValue('pixiv_history','')
  5359. document.getElementById('history_back').innerHTML=''
  5360. addHistory(0,0)
  5361. }
  5362. }
  5363.  
  5364. //隐藏按钮
  5365. var historyVisible = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5366. var pathHistoryVisiblePupil = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5367. var pathHistoryVisibleBrow = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5368. var pathHistoryVisibleAbandon = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5369.  
  5370. historyVisible.setAttribute("aria-hidden","true");
  5371. historyVisible.setAttribute('viewbox', '0 0 30 30');
  5372. historyVisible.setAttribute('width', '30px');
  5373. historyVisible.setAttribute('height', '30px');
  5374. pathHistoryVisiblePupil.setAttribute('d','M512 390.961296 c-66.772776 0-121.038704 54.265928-121.038704 121.038704s54.265928 121.038704 121.038704 121.038704 121.038704-54.265928 121.038704-121.038704S578.772776 390.961296 512 390.961296z')
  5375. pathHistoryVisiblePupil.style.transform="translate(2px, 2px) scale(0.025)"
  5376. pathHistoryVisiblePupil.setAttribute('fill', '#000');
  5377. pathHistoryVisiblePupil.style.opacity='0.5'
  5378. pathHistoryVisiblePupil.style.transition='0.15s'
  5379. pathHistoryVisiblePupil.id='path_historyVisiblePupil'
  5380. historyVisible.appendChild(pathHistoryVisiblePupil);
  5381.  
  5382. pathHistoryVisibleBrow.setAttribute('d','M512 209.403241c-201.731514 0-374.009206 125.476783-443.808922 302.596759 69.798692 177.119977 242.077408 302.596759 443.808922 302.596759 201.933105 0 374.010229-125.476783 443.808922-302.596759C886.009206 334.880023 713.933105 209.403241 512 209.403241zM512 713.731514c-111.355157 0-201.731514-90.375334-201.731514-201.731514s90.375334-201.731514 201.731514-201.731514 201.731514 90.375334 201.731514 201.731514S623.355157 713.731514 512 713.731514z')
  5383. pathHistoryVisibleBrow.style.transform="translate(2px, 2px) scale(0.025)"
  5384. pathHistoryVisibleBrow.setAttribute('fill', '#000');
  5385. pathHistoryVisibleBrow.style.opacity='0.5'
  5386. pathHistoryVisibleBrow.id='path_historyVisibleBrow'
  5387. historyVisible.appendChild(pathHistoryVisibleBrow);
  5388. historyVisible.id = 'history_visible';
  5389. historyBigTitle.appendChild(historyVisible);
  5390.  
  5391. pathHistoryVisibleAbandon.setAttribute('d','M194.078118 43.489882a60.235294 60.235294 0 0 1 85.172706 0l851.847529 851.84753a60.235294 60.235294 0 0 1-85.172706 85.172706L194.078118 128.662588a60.235294 60.235294 0 0 1 0-85.172706z')
  5392. pathHistoryVisibleAbandon.style.transform="rotate(90deg) translate(1px, -25px) scale(0.02)"
  5393. pathHistoryVisibleAbandon.setAttribute('fill', '#000');
  5394. pathHistoryVisibleAbandon.style.opacity='0.5'
  5395. if(getCookie('history_R18')==0){
  5396. pathHistoryVisibleAbandon.style.display='block'
  5397. }
  5398. if(getCookie('history_R18')==1){
  5399. pathHistoryVisibleAbandon.style.display='none'
  5400. }
  5401. pathHistoryVisibleAbandon.id='path_historyVisibleBrow'
  5402. historyVisible.appendChild(pathHistoryVisibleAbandon);
  5403.  
  5404. historyVisible.onmouseenter=function(){
  5405. pathHistoryVisiblePupil.style.transform='translate(4.5px, 4.5px) scale(0.02)'
  5406. setTimeout(function () {
  5407. pathHistoryVisiblePupil.style.transform='translate(3px, 4.5px) scale(0.02)'
  5408. }, 150);
  5409. setTimeout(function () {
  5410. pathHistoryVisiblePupil.style.transform='translate(6px, 4.5px) scale(0.02)'
  5411. }, 300);
  5412. setTimeout(function () {
  5413. pathHistoryVisiblePupil.style.transform='translate(4.5px, 4.5px) scale(0.02)'
  5414. }, 450);
  5415. }
  5416. historyVisible.onmouseleave=function(){
  5417. pathHistoryVisiblePupil.style.transform='translate(2px, 2px) scale(0.025)'
  5418. }
  5419. historyVisible.onclick=function(){
  5420. if(pathHistoryVisibleAbandon.style.display=='none'){
  5421. pathHistoryVisibleAbandon.style.display='block'
  5422. setCookie('history_R18',0)//隐藏R-18
  5423. }
  5424. else if(pathHistoryVisibleAbandon.style.display=='block'){
  5425. pathHistoryVisibleAbandon.style.display='none'
  5426. setCookie('history_R18',1)//显示R-18
  5427. }
  5428. if(document.getElementById('history_pageNum')!=null){
  5429. document.getElementById('history_pageNum').innerText=1
  5430. document.getElementById('history_back').innerHTML=''
  5431. addHistory(0,0)
  5432. }
  5433. }
  5434.  
  5435. var historyPageBack=document.createElement('a')
  5436. historyPageBack.id='history_pageBack'
  5437. historyAll.appendChild(historyPageBack)
  5438.  
  5439.  
  5440. var beforeBig = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5441. var pathBeforeBig = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5442. beforeBig.setAttribute("aria-hidden","true");
  5443. beforeBig.setAttribute('viewbox', '0 0 24 24');
  5444. beforeBig.setAttribute('width', '16px');
  5445. beforeBig.setAttribute('height', '16px');
  5446. pathBeforeBig.setAttribute('d','M602.496 512l338.752 338.752-90.496 90.496L421.504 512l429.248-429.248 90.496 90.496L602.496 512z m-320 0l338.752 338.752-90.496 90.496L101.504 512l429.248-429.248 90.496 90.496L282.496 512z')
  5447. pathBeforeBig.style.transform="scale(0.018)"
  5448. pathBeforeBig.setAttribute('fill', '#000');
  5449. pathBeforeBig.style.opacity='0.5'
  5450. pathBeforeBig.style.transition='0.15s'
  5451. pathBeforeBig.id='pathBeforeBig'
  5452. beforeBig.appendChild(pathBeforeBig);
  5453. beforeBig.id = 'beforeBig';
  5454. beforeBig.setAttribute('class', 'history_page');
  5455. historyPageBack.appendChild(beforeBig);
  5456. beforeBig.onmouseenter=function(){
  5457. pathBeforeBig.style.opacity='0.8'
  5458. }
  5459. beforeBig.onmouseleave=function(){
  5460. pathBeforeBig.style.opacity='0.5'
  5461. }
  5462.  
  5463. var beforeSmall = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5464. var pathBeforeSmall = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5465. beforeSmall.setAttribute("aria-hidden","true");
  5466. beforeSmall.setAttribute('viewbox', '0 0 24 24');
  5467. beforeSmall.setAttribute('width', '16px');
  5468. beforeSmall.setAttribute('height', '16px');
  5469. pathBeforeSmall.setAttribute('d','M602.496 512l338.752 338.752-90.496 90.496L421.504 512l429.248-429.248 90.496 90.496L602.496 512z m-320 0z')
  5470. pathBeforeSmall.style.transform="scale(0.018)"
  5471. pathBeforeSmall.setAttribute('fill', '#000');
  5472. pathBeforeSmall.style.opacity='0.5'
  5473. pathBeforeSmall.style.transition='0.15s'
  5474. pathBeforeSmall.id='pathBeforeSmall'
  5475. beforeSmall.appendChild(pathBeforeSmall);
  5476. beforeSmall.id = 'beforeSmall';
  5477. beforeSmall.setAttribute('class', 'history_page');
  5478. beforeSmall.style.paddingRight='20px'
  5479. historyPageBack.appendChild(beforeSmall);
  5480. beforeSmall.onmouseenter=function(){
  5481. pathBeforeSmall.style.opacity='0.8'
  5482. }
  5483. beforeSmall.onmouseleave=function(){
  5484. pathBeforeSmall.style.opacity='0.5'
  5485. }
  5486.  
  5487. var pageNum=document.createElement('text')
  5488. pageNum.id='history_pageNum'
  5489. pageNum.innerText='1'
  5490. historyPageBack.appendChild(pageNum)
  5491.  
  5492. var afterSmall = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5493. var pathAfterSmall = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5494. afterSmall.setAttribute("aria-hidden","true");
  5495. afterSmall.setAttribute('viewbox', '0 0 24 24');
  5496. afterSmall.setAttribute('width', '16px');
  5497. afterSmall.setAttribute('height', '16px');
  5498. pathAfterSmall.setAttribute('d','M421.504 512l-338.752-338.752 90.496-90.496L602.496 512l-429.248 429.248-90.496-90.496L421.504 512z m320 0')
  5499. pathAfterSmall.style.transform="scale(0.018)"
  5500. pathAfterSmall.setAttribute('fill', '#000');
  5501. pathAfterSmall.style.opacity='0.5'
  5502. pathAfterSmall.style.transition='0.15s'
  5503. pathAfterSmall.id='pathAfterSmall'
  5504. afterSmall.appendChild(pathAfterSmall);
  5505. afterSmall.id = 'afterSmall';
  5506. afterSmall.setAttribute('class', 'history_page');
  5507. afterSmall.style.paddingLeft='20px'
  5508. historyPageBack.appendChild(afterSmall);
  5509. afterSmall.onmouseenter=function(){
  5510. pathAfterSmall.style.opacity='0.8'
  5511. }
  5512. afterSmall.onmouseleave=function(){
  5513. pathAfterSmall.style.opacity='0.5'
  5514. }
  5515.  
  5516. var afterBig = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5517. var pathAfterBig = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5518. afterBig.setAttribute("aria-hidden","true");
  5519. afterBig.setAttribute('viewbox', '0 0 24 24');
  5520. afterBig.setAttribute('width', '16px');
  5521. afterBig.setAttribute('height', '16px');
  5522. pathAfterBig.setAttribute('d','M421.504 512l-338.752-338.752 90.496-90.496L602.496 512l-429.248 429.248-90.496-90.496L421.504 512z m320 0l-338.752-338.752 90.496-90.496L922.496 512l-429.248 429.248-90.496-90.496L741.504 512z')
  5523. pathAfterBig.style.transform="scale(0.018)"
  5524. pathAfterBig.setAttribute('fill', '#000');
  5525. pathAfterBig.style.opacity='0.5'
  5526. pathAfterBig.style.transition='0.15s'
  5527. pathAfterBig.id='pathAfterBig'
  5528. afterBig.appendChild(pathAfterBig);
  5529. afterBig.id = 'afterBig';
  5530. afterBig.setAttribute('class', 'history_page');
  5531. historyPageBack.appendChild(afterBig);
  5532. afterBig.onmouseenter=function(){
  5533. pathAfterBig.style.opacity='0.8'
  5534. }
  5535. afterBig.onmouseleave=function(){
  5536. pathAfterBig.style.opacity='0.5'
  5537. }
  5538.  
  5539. var historyBack=document.createElement('div')
  5540. historyBack.id='history_back'
  5541. historyAll.appendChild(historyBack)
  5542. addHistory(0,0)
  5543. setTimeout(function () {
  5544. historyAll.style.transform='scale(1)'
  5545. }, 200);
  5546. //————————————————————————————————————————————————————————
  5547. }
  5548. else{
  5549. document.getElementById('history_all').style.transform='scale(0.01)'
  5550. setTimeout(function () {
  5551. document.getElementById('history_all').remove()
  5552. }, 300);
  5553. }
  5554.  
  5555. })
  5556.  
  5557. //分别绑定翻页事件
  5558. window.addEventListener('click',function(event){
  5559. if(document.getElementById('history_pageNum')!=null){
  5560. if(all_historyList%15!=0){
  5561. var max_all_historyList=parseInt(all_historyList/15)+1
  5562. }
  5563. else{
  5564. max_all_historyList=all_historyList/15
  5565. }
  5566. if(event.target.id=='beforeBig'||event.target.id=='pathBeforeBig'){
  5567. document.getElementById('history_back').innerHTML=''
  5568. document.getElementById('history_pageNum').innerText='1'
  5569. addHistory(0,0)
  5570. console.log('beforeBig')
  5571. }
  5572. else if((event.target.id=='beforeSmall'||event.target.id=='pathBeforeSmall')&&document.getElementById('history_pageNum').innerText>=2){
  5573. document.getElementById('history_back').innerHTML=''
  5574. document.getElementById('history_pageNum').innerText=parseInt(document.getElementById('history_pageNum').innerText)-1
  5575. addHistory((parseInt(document.getElementById('history_pageNum').innerText)-1)*15,0)
  5576. console.log('beforeSmall')
  5577. }
  5578. else if((event.target.id=='afterSmall'||event.target.id=='pathAfterSmall')&&document.getElementById('history_pageNum').innerText<max_all_historyList){
  5579. document.getElementById('history_back').innerHTML=''
  5580. document.getElementById('history_pageNum').innerText=parseInt(document.getElementById('history_pageNum').innerText)+1
  5581. addHistory((parseInt(document.getElementById('history_pageNum').innerText)-1)*15,0)
  5582. console.log('afterSmall')
  5583. }
  5584. else if(event.target.id=='afterBig'||event.target.id=='pathAfterBig'){
  5585. document.getElementById('history_back').innerHTML=''
  5586. document.getElementById('history_pageNum').innerText=max_all_historyList
  5587. addHistory((parseInt(document.getElementById('history_pageNum').innerText)-1)*15,0)
  5588. console.log('afterBig')
  5589. }
  5590. }
  5591. if(event.target.id=='history_pageNum'){
  5592. var number=document.getElementById('history_pageNum').innerText
  5593. document.getElementById('history_pageNum').outerHTML='<input id="history_pageInput" style="top: 500px;z-index: 1;width: 22px;">'
  5594. document.getElementById('history_pageInput').value=number
  5595. document.getElementById('history_pageInput').focus()
  5596. document.getElementById('history_pageInput').onblur=function(){
  5597. document.getElementById('history_back').innerHTML=''
  5598. document.getElementById('history_pageInput').outerHTML='<text id="history_pageNum">'+document.getElementById('history_pageInput').value+'</text>'
  5599. if(parseInt(document.getElementById('history_pageNum').innerText)>max_all_historyList){
  5600. document.getElementById('history_pageNum').innerText=max_all_historyList
  5601. }
  5602. else if(parseInt(document.getElementById('history_pageNum').innerText)<1){
  5603. document.getElementById('history_pageNum').innerText=1
  5604. }
  5605. addHistory((parseInt(document.getElementById('history_pageNum').innerText)-1)*15,0)
  5606. }
  5607. document.getElementById('history_pageInput').onkeydown=function(e){
  5608. if(e.keyCode==13){
  5609. document.getElementById('history_pageInput').blur()
  5610. }
  5611. }
  5612. }
  5613. })
  5614.  
  5615.  
  5616. /*function details(arr){
  5617. // var allBookmark=[]
  5618. var count=0
  5619. var load_count=0
  5620. var load_count_div=document.createElement('div')
  5621. load_count_div.id='load_count_div'
  5622. document.body.appendChild(load_count_div)
  5623. var load_count_text=document.createElement('div')
  5624. load_count_text.id='load_count_text'
  5625. load_count_div.appendChild(load_count_text)
  5626. var details_interval_count=-1
  5627. var details_interval=setInterval(function(){
  5628. details_interval_count++
  5629. if(details_interval_count>arr.length){
  5630. clearInterval(details_interval)
  5631. }
  5632.  
  5633. GM_xmlhttpRequest({
  5634. method: "GET",
  5635. url: "https://www.pixiv.net/touch/ajax/illust/details?illust_id="+arr[details_interval_count],
  5636. headers:{
  5637. "User-Agent": navigator.userAgent,
  5638. "x-user-id": 10000000,
  5639. },
  5640. onload: function(res) {
  5641. if(res.status === 200){
  5642. load_count++
  5643. load_count_text.innerText=load_count+'/'+arr.length
  5644. if(load_count==arr.length){
  5645. load_count_div.style.opacity=0
  5646. setTimeout(function(){
  5647. load_count_div.remove()
  5648. },500)
  5649. }
  5650. //console.log('成功')
  5651. var p=res.responseText
  5652. var json=JSON.parse(p.replace(/\\(?!(\/|u))/g,'\\'))
  5653. // console.log(json)
  5654. //收藏数,作品id,作品名称,作品预览图,作品数量,作品类型,R_18,是否收藏,作者id,作者名称;
  5655. //作品名称“title”
  5656. //作品预览图“url_s”
  5657. //作者id“user_id”
  5658. //作者名称“title”
  5659. var bookmarkNum=json.body.illust_details.bookmark_user_total
  5660. var illustID=json.body.illust_details.id
  5661. var illustName=json.body.illust_details.alt
  5662. var illustImg=json.body.illust_details.url_s.replace('https://i.pximg.net/c/128x128','https://i.pximg.net/c/250x250_80_a2')
  5663. var illustNumber=json.body.illust_details.page_count
  5664. var illustType=json.body.illust_details.type
  5665. var R_18=false
  5666. var illustRestrict=json.body.illust_details.bookmark_restrict//0-普通收藏;1-隐私收藏;2-未收藏
  5667. if(illustRestrict==null){
  5668. illustRestrict=2
  5669. }
  5670. if(JSON.stringify(json.body.illust_details.tags).match(/(R18|R\-18)/)){
  5671. R_18=true
  5672. }
  5673. var authorID=json.body.illust_details.author_details.user_id
  5674. var authorName=json.body.illust_details.author_details.user_name
  5675.  
  5676. // var bookmarkNum=p.match(/(?<=bookmark_user_total\"\:)\d+(?=\,)/)
  5677. // var bookmarkID=p.match(/(?<=\"id\"\:\")\d+(?=\")/)
  5678. if(bookmarkNum.length!=0&&illustID.length!=0){
  5679. if(allBookmark[bookmarkNum]==null){
  5680. allBookmark[bookmarkNum]=bookmarkNum+','+illustID+','+illustName+','+illustImg+','+illustNumber+','+illustType+','+R_18+','+illustRestrict+','+authorID+','+authorName
  5681. }
  5682. else if(allBookmark[bookmarkNum]!=null&&allBookmark[bookmarkNum].match(illustID)==null){
  5683. allBookmark[bookmarkNum]=allBookmark[bookmarkNum]+';'+illustID+','+illustName+','+illustImg+','+illustNumber+','+illustType+','+R_18+','+illustRestrict+','+authorID+','+authorName
  5684. }
  5685. }
  5686. }
  5687. count++
  5688. if(count==arr.length){
  5689. allBookmark=allBookmark.filter(function(){return true})
  5690. console.log(allBookmark)
  5691. // console.log(aaa)
  5692.  
  5693.  
  5694. var sort_ul=document.createElement('ul')
  5695. sort_ul.id='sort_ul'
  5696. sort_ul.className='sort_ul'
  5697. var sort_ul_out=document.getElementsByClassName('sc-l7cibp-0 juyBTC')[0]//搜索界面“预览图”框架的ul元素的父元素
  5698. sort_ul_out.appendChild(sort_ul)
  5699. if(document.getElementsByClassName('sc-l7cibp-3 gCRmsl')!=null){
  5700. sort_ul_out.insertBefore(sort_ul,document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0])
  5701. }
  5702. document.getElementsByClassName('sc-l7cibp-1 krFoBL')[0].style.display='none'//原本搜索页ul元素
  5703. document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0].style.display='none'//原本页面页码部分(换页)
  5704.  
  5705. var sort_more_out=document.createElement('div')
  5706. sort_more_out.id='sort_more_out'
  5707. sort_ul_out.appendChild(sort_more_out)
  5708.  
  5709. var sort_more_background=document.createElement('div')
  5710. sort_more_background.id='sort_more_background'
  5711. sort_more_out.appendChild(sort_more_background)
  5712.  
  5713. var sort_more_text=document.createElement('div')
  5714. sort_more_text.id='sort_more_text'
  5715. sort_more_text.innerText='查看更多'
  5716. sort_more_background.appendChild(sort_more_text)
  5717.  
  5718. //收藏数,作品id,作品名称,作品预览图,作品数量,作品类型,R_18,是否收藏,作者id,作者名称;
  5719. var allBookmark_split=[]
  5720. for(var j=0;j<allBookmark.length;j++){
  5721. for(var k=0;k<allBookmark[j].split(';').length;k++){
  5722. if(k==0){
  5723. allBookmark_split.push(allBookmark[j].split(';')[0])
  5724. }
  5725. else{
  5726. allBookmark_split.push(allBookmark[j].split(';')[0].split(',')[0]+','+allBookmark[j].split(';')[k])
  5727. }
  5728. }
  5729. }
  5730. console.log(allBookmark_split)
  5731. var sort_first_length=allBookmark_split.length-60
  5732. if(sort_first_length<0){
  5733. sort_first_length=0
  5734. }
  5735. for(var i=allBookmark_split.length-1;i>=sort_first_length;i--){
  5736. var sort_info=allBookmark_split[i].split(',')
  5737. sort_addillust(sort_info[0],sort_info[1],sort_info[2],sort_info[3],sort_info[4],sort_info[5],sort_info[6],sort_info[7],sort_info[8],sort_info[9])
  5738. }
  5739.  
  5740. sort_more_background.onclick=function(){
  5741. var sort_less_length=document.getElementsByClassName('sort_li').length
  5742. var allBookmark_length=allBookmark_split.length
  5743. console.log(allBookmark_split)
  5744. if(sort_less_length<allBookmark_length){
  5745. var length=60
  5746. if(allBookmark_length-sort_less_length<60){
  5747. length=allBookmark_length-sort_less_length
  5748. }
  5749. for(var h=length-1;h>0;h--){
  5750. var sort_info=allBookmark_split[allBookmark_length-sort_less_length-1-(length-1-h)].split(',')
  5751. sort_addillust(sort_info[0],sort_info[1],sort_info[2],sort_info[3],sort_info[4],sort_info[5],sort_info[6],sort_info[7],sort_info[8],sort_info[9])
  5752. }
  5753. }
  5754. }
  5755. }
  5756. // if(p.match(/R-18/)!=null){
  5757. // aaa++
  5758. // }
  5759. }
  5760. })
  5761. },1)
  5762. }*/
  5763.  
  5764.  
  5765.  
  5766. function sort_addillust(bookmark,illustID,illustName,illustImg,illustNumber,illustType,R_18,illustRestrict,authorID,authorName){
  5767. //收藏数,作品id,作品名称,作品预览图,作者id,作者名称;
  5768. //收藏数,作品id,作品名称,作品预览图,作品数量,作品类型,R_18,是否收藏,作者id,作者名称;
  5769. var sort_ul=document.getElementById('sort_ul')
  5770. var sort_li=document.createElement('li')
  5771. sort_li.className='sort_li'
  5772. sort_ul.appendChild(sort_li)
  5773.  
  5774. var sort_a=document.createElement('a')
  5775. sort_a.className='sort_a'
  5776. sort_a.href='https://www.pixiv.net/artworks/'+illustID
  5777. sort_li.appendChild(sort_a)
  5778.  
  5779. var sort_up=document.createElement('div')
  5780. sort_up.className='sort_up'
  5781. sort_a.appendChild(sort_up)
  5782.  
  5783. var sort_page=document.createElement('div')
  5784. sort_page.className='sort_page'
  5785. sort_up.appendChild(sort_page)
  5786.  
  5787. if(illustNumber>1){
  5788. sort_page.style='width: 20px;height: 18px;display: flex;justify-content: center;flex: 0 0 auto;color: rgb(255, 255, 255);font-weight: bold;padding: 0px 6px;background: rgba(0, 0, 0, 0.32);border-radius: 10px;font-size: 10px;transform: translate(-5px, 5px);'
  5789. var sort_page_svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5790. var sort_page_path = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5791. sort_page_svg.setAttribute('viewbox', '0 0 24 24');
  5792. sort_page_svg.setAttribute('size', '9');
  5793. sort_page_svg.setAttribute=('class', 'sort_page_svg');
  5794. sort_page_path.setAttribute('d','M8,3 C8.55228475,3 9,3.44771525 9,4 L9,9 C9,9.55228475 8.55228475,10 8,10 L3,10 C2.44771525,10 2,9.55228475 2,9 L6,9 C7.1045695,9 8,8.1045695 8,7 L8,3 Z M1,1 L6,1 C6.55228475,1 7,1.44771525 7,2 L7,7 C7,7.55228475 6.55228475,8 6,8 L1,8 C0.44771525,8 0,7.55228475 0,7 L0,2 C0,1.44771525 0.44771525,1 1,1 Z')
  5795. sort_page_path.setAttribute('fill','white')
  5796. sort_page_path.id='sort_page_path'
  5797. sort_page_svg.appendChild(sort_page_path)
  5798. sort_page.appendChild(sort_page_svg)
  5799. var sort_page_number=document.createElement('text')
  5800. sort_page_number.className='sort_page_number'
  5801. sort_page_number.innerText=illustNumber
  5802. sort_page.style.width=20+(illustNumber.length-1)*7+'px'
  5803. sort_page.appendChild(sort_page_number)
  5804. }
  5805.  
  5806. if(R_18=='true'){
  5807. var sort_R18=document.createElement('div')
  5808. sort_R18.className='sort_R18'
  5809. sort_R18.innerText='R-18'
  5810. sort_R18.style.transform='translate(5px, 5px)'
  5811. sort_up.appendChild(sort_R18)
  5812. }
  5813.  
  5814. var sort_img=document.createElement('img')
  5815. sort_img.className='sort_img'
  5816. sort_img.src=illustImg
  5817. sort_a.appendChild(sort_img)
  5818.  
  5819. if(illustType=='2'){
  5820. var sort_gif = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5821. sort_gif.setAttribute('viewbox', '0 0 24 24');
  5822. sort_gif.setAttribute('class','sort_gif');
  5823. sort_gif.innerHTML=`<circle cx="12" cy="12" r="10" class="sort_gif_circle"></circle><path class='sort_gif_path' d="M9,8.74841664 L9,15.2515834 C9,15.8038681 9.44771525,16.2515834 10,16.2515834C10.1782928,16.2515834 10.3533435,16.2039156 10.5070201,16.1135176 L16.0347118,12.8619342C16.510745,12.5819147 16.6696454,11.969013 16.3896259,11.4929799C16.3034179,11.3464262 16.1812655,11.2242738 16.0347118,11.1380658 L10.5070201,7.88648243C10.030987,7.60646294 9.41808527,7.76536339 9.13806578,8.24139652C9.04766776,8.39507316 9,8.57012386 9,8.74841664 Z" class="sc-192k5ld-2 jwyUTl"></path>`
  5824. sort_a.appendChild(sort_gif)
  5825. }
  5826.  
  5827. var sort_text_div=document.createElement('div')
  5828. sort_text_div.className='sort_text_div'
  5829. sort_li.appendChild(sort_text_div)
  5830.  
  5831. var sort_img_name=document.createElement('a')
  5832. sort_img_name.className='sort_img_name'
  5833. sort_img_name.innerText=illustName
  5834. sort_img_name.href='https://www.pixiv.net/artworks/'+illustID
  5835. sort_text_div.appendChild(sort_img_name)
  5836.  
  5837. var br=document.createElement('br')
  5838. sort_text_div.appendChild(br)
  5839.  
  5840. var sort_author_name=document.createElement('a')
  5841. sort_author_name.className='sort_author_name'
  5842. sort_author_name.innerText=authorName
  5843. sort_author_name.href='https://www.pixiv.net/users/'+authorID
  5844. sort_text_div.appendChild(sort_author_name)
  5845.  
  5846. var sort_down=document.createElement('div')
  5847. sort_down.className='sort_down'
  5848. sort_a.appendChild(sort_down)
  5849.  
  5850. var sort_bookmark=document.createElement('div')
  5851. sort_bookmark.className='sort_bookmark'
  5852. sort_bookmark.innerText=bookmark
  5853. sort_down.appendChild(sort_bookmark)
  5854.  
  5855. var divdivdiv=document.createElement('div')
  5856. divdivdiv.className='divdivdiv'
  5857. divdivdiv.style.width='0px'
  5858. divdivdiv.style.height='0px'
  5859. sort_li.appendChild(divdivdiv)
  5860. var sort_love_button=document.createElement('button')
  5861. sort_love_button.className='sort_love_button'
  5862. divdivdiv.appendChild(sort_love_button)
  5863. var sort_love_svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  5864. var sort_love_path_1 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5865. var sort_love_path_2 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5866. sort_love_svg.setAttribute('viewbox', '0 0 24 24');
  5867. sort_love_svg.setAttribute('size', '9');
  5868. sort_love_svg.setAttribute=('class', 'sort_love_svg');
  5869. sort_love_svg.style.width='30px'
  5870. sort_love_svg.style.height='30px'
  5871. sort_love_path_1.setAttribute('d','M21,5.5 C24.8659932,5.5 28,8.63400675 28,12.5 C28,18.2694439 24.2975093,23.1517313 17.2206059,27.1100183 C16.4622493,27.5342993 15.5379984,27.5343235 14.779626,27.110148 C7.70250208,23.1517462 4,18.2694529 4,12.5 C4,8.63400691 7.13400681,5.5 11,5.5 C12.829814,5.5 14.6210123,6.4144028 16,7.8282366 C17.3789877,6.4144028 19.170186,5.5 21,5.5 Z')
  5872. sort_love_path_2.setAttribute('d','M16,11.3317089 C15.0857201,9.28334665 13.0491506,7.5 11,7.5 C8.23857625,7.5 6,9.73857647 6,12.5 C6,17.4386065 9.2519779,21.7268174 15.7559337,25.3646328 C15.9076021,25.4494645 16.092439,25.4494644 16.2441073,25.3646326 C22.7480325,21.7268037 26,17.4385986 26,12.5 C26,9.73857625 23.7614237,7.5 21,7.5 C18.9508494,7.5 16.9142799,9.28334665 16,11.3317089 Z')
  5873. sort_love_path_1.setAttribute('fill','black')
  5874. sort_love_path_2.setAttribute('fill','white')
  5875. sort_love_svg.appendChild(sort_love_path_1)
  5876. sort_love_svg.appendChild(sort_love_path_2)
  5877. if(illustRestrict==0){
  5878. sort_love_path_1.setAttribute('fill','red')
  5879. sort_love_path_2.setAttribute('fill','red')
  5880. }
  5881. else if(illustRestrict==1){
  5882. sort_love_path_1.setAttribute('fill','red')
  5883. sort_love_path_2.setAttribute('fill','red')
  5884.  
  5885. var sort_love_path_3 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5886. var sort_love_path_4 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  5887. sort_love_path_3.setAttribute('d','M29.9796 20.5234C31.1865 21.2121 32 22.511 32 24V28 C32 30.2091 30.2091 32 28 32H21C18.7909 32 17 30.2091 17 28V24C17 22.511 17.8135 21.2121 19.0204 20.5234 C19.2619 17.709 21.623 15.5 24.5 15.5C27.377 15.5 29.7381 17.709 29.9796 20.5234Z')
  5888. sort_love_path_4.setAttribute('d','M28 22C29.1046 22 30 22.8954 30 24V28C30 29.1046 29.1046 30 28 30H21 C19.8954 30 19 29.1046 19 28V24C19 22.8954 19.8954 22 21 22V21C21 19.067 22.567 17.5 24.5 17.5 C26.433 17.5 28 19.067 28 21V22ZM23 21C23 20.1716 23.6716 19.5 24.5 19.5C25.3284 19.5 26 20.1716 26 21V22H23 V21Z')
  5889. sort_love_path_3.setAttribute('fill','white')
  5890. sort_love_path_4.setAttribute('fill','black')
  5891. sort_love_svg.appendChild(sort_love_path_3)
  5892. sort_love_svg.appendChild(sort_love_path_4)
  5893. }
  5894. sort_love_button.appendChild(sort_love_svg)
  5895. sort_love_button.onclick=function(event){
  5896. // console.log('a')
  5897. isProhibit=0//0为未屏蔽,1为屏蔽
  5898. var cookie_tag_safe=[]
  5899. var id=event.target.closest('.divdivdiv').previousSibling.previousSibling.href.match(/(?<=artworks\/)\d+/)[0]
  5900. GM_xmlhttpRequest({
  5901. method: "GET",
  5902. url: "https://www.pixiv.net/artworks/"+id,
  5903. headers:{
  5904. "User-Agent": navigator.userAgent,
  5905. },
  5906. onload: function(res) {
  5907. if(res.status === 200){
  5908. //console.log('成功')
  5909. var p=res.responseText
  5910. var final=p.match(/(?<="tag":").*?(?=")/g).toString().split(',')
  5911. if(GM_getValue('tagSaveSafe')==''){
  5912. var tag_cookie=tagSaveSafe.split('*')
  5913. }
  5914. else{
  5915. tag_cookie=GM_getValue('tagSaveSafe').split('*')
  5916. }
  5917. if(GM_getValue('tagProhibit')==''){
  5918. var tag_Prohibit=''
  5919. }
  5920. else{
  5921. tag_Prohibit=GM_getValue('tagProhibit')
  5922. }
  5923. cookie_tag_safe[0]='全部'
  5924. var count=1
  5925. if(getCookie('tagCookieSetting')==1){
  5926. for(var i=0;i<final.length;i++){
  5927. for(var j=0;j<tag_cookie.length;j++){
  5928. if(tag_Prohibit.match(final[i])!=null){
  5929. isProhibit=final[i];
  5930. break;
  5931. }
  5932. if(tag_cookie[j].match(final[i])!=null){
  5933. cookie_tag_safe[count]=tag_cookie[j].split(',')[0]
  5934. count++
  5935. }
  5936. }
  5937. if(isProhibit==1){
  5938. break;
  5939. }
  5940. }
  5941. }
  5942. if(isProhibit==0){
  5943. fetch("https://www.pixiv.net/ajax/illusts/bookmarks/add",{
  5944. headers: {
  5945. "accept": "application/json",
  5946. "content-type": "application/json; charset=utf-8",
  5947. "x-csrf-token": getCookie('token')
  5948. },
  5949. "referrer": "https://www.pixiv.net",
  5950. 'method':'POST',
  5951. 'body':JSON.stringify({illust_id: id, restrict: 0, comment: "", tags: cookie_tag_safe})//不确定restrict全年龄时的数值
  5952. })
  5953. loveTagView(cookie_tag_safe)
  5954. var button=event.target.closest('button')
  5955. if(button!=null&&button.getElementsByClassName('sort_love_path_1')!=null&&button.getElementsByClassName('sort_love_path_2')!=null){
  5956. // button.getElementsByClassName('sort_love_path_1')[0].style.fill='red'
  5957. // button.getElementsByClassName('sort_love_path_2')[0].style.fill='red'
  5958. button.childNodes[0].childNodes[0].style.fill='red'
  5959. button.childNodes[0].childNodes[1].style.fill='red'
  5960. }
  5961. }
  5962. }
  5963. }
  5964. })
  5965. }
  5966. sort_love_button.oncontextmenu=function(event){
  5967. // console.log('a')
  5968. var cookie_tag=[]
  5969. var id=event.target.closest('.divdivdiv').previousSibling.previousSibling.href.match(/(?<=artworks\/)\d+/)[0]
  5970. GM_xmlhttpRequest({
  5971. method: "GET",
  5972. url: "https://www.pixiv.net/artworks/"+id,
  5973. headers:{
  5974. "User-Agent": navigator.userAgent,
  5975. },
  5976. onload: function(res) {
  5977. if(res.status === 200){
  5978. //console.log('成功')
  5979. isProhibit=0//0为未屏蔽,1为屏蔽
  5980. var p=res.responseText
  5981. var final=p.match(/(?<="tag":").*?(?=")/g).toString().split(',')
  5982. // console.log(final)
  5983. if(GM_getValue('tagSave')==''){
  5984. var tag_cookie=tagSave.split('*')
  5985. }
  5986. else{
  5987. tag_cookie=GM_getValue('tagSave').split('*')
  5988. }
  5989. if(GM_getValue('tagProhibit')==''){
  5990. var tag_Prohibit=''
  5991. }
  5992. else{
  5993. tag_Prohibit=GM_getValue('tagProhibit')
  5994. }
  5995. cookie_tag[0]='全部'
  5996. var count=1
  5997. if(getCookie('tagCookieSetting')==1){
  5998. for(var i=0;i<final.length;i++){
  5999. for(var j=0;j<tag_cookie.length;j++){
  6000. if(tag_Prohibit.match(final[i])!=null){
  6001. isProhibit=final[i];
  6002. break;
  6003. }
  6004. if(tag_cookie[j].match(final[i])!=null){
  6005. cookie_tag[count]=tag_cookie[j].split(',')[0]
  6006. count++
  6007. }
  6008. }
  6009. if(isProhibit==1){
  6010. break;
  6011. }
  6012. }
  6013. }
  6014. if(isProhibit==0){
  6015. fetch("https://www.pixiv.net/ajax/illusts/bookmarks/add",{
  6016. headers: {
  6017. "accept": "application/json",
  6018. "content-type": "application/json; charset=utf-8",
  6019. "x-csrf-token": getCookie('token')
  6020. },
  6021. "referrer": "https://www.pixiv.net",
  6022. 'method':'POST',
  6023. 'body':JSON.stringify({illust_id: id, restrict: 1, comment: "", tags: cookie_tag})
  6024. })
  6025. loveTagView(cookie_tag)
  6026. var button=event.target.closest('button')
  6027. if(button!=null&&button.getElementsByClassName('sort_love_path_1')!=null&&button.getElementsByClassName('sort_love_path_2')!=null){
  6028. // button.getElementsByClassName('sort_love_path_1')[0].style.fill='red'
  6029. // button.getElementsByClassName('sort_love_path_2')[0].style.fill='red'
  6030. button.childNodes[0].childNodes[0].style.fill='red'
  6031. button.childNodes[0].childNodes[1].style.fill='red'
  6032. var sort_love_path_3 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  6033. var sort_love_path_4 = document.createElementNS("http://www.w3.org/2000/svg", 'path');
  6034. sort_love_path_3.setAttribute('d','M29.9796 20.5234C31.1865 21.2121 32 22.511 32 24V28 C32 30.2091 30.2091 32 28 32H21C18.7909 32 17 30.2091 17 28V24C17 22.511 17.8135 21.2121 19.0204 20.5234 C19.2619 17.709 21.623 15.5 24.5 15.5C27.377 15.5 29.7381 17.709 29.9796 20.5234Z')
  6035. sort_love_path_4.setAttribute('d','M28 22C29.1046 22 30 22.8954 30 24V28C30 29.1046 29.1046 30 28 30H21 C19.8954 30 19 29.1046 19 28V24C19 22.8954 19.8954 22 21 22V21C21 19.067 22.567 17.5 24.5 17.5 C26.433 17.5 28 19.067 28 21V22ZM23 21C23 20.1716 23.6716 19.5 24.5 19.5C25.3284 19.5 26 20.1716 26 21V22H23 V21Z')
  6036. sort_love_path_3.setAttribute('fill','white')
  6037. sort_love_path_4.setAttribute('fill','black')
  6038. button.childNodes[0].appendChild(sort_love_path_3)
  6039. button.childNodes[0].appendChild(sort_love_path_4)
  6040. }
  6041. }
  6042. }
  6043. }
  6044. })
  6045. event.preventDefault()
  6046. }
  6047.  
  6048. //!!!var sort_love=document.createElement('svg')
  6049. }
  6050.  
  6051.  
  6052.  
  6053.  
  6054. function single_sort(){
  6055. var sort_ul=document.createElement('ul')
  6056. sort_ul.id='sort_ul'
  6057. sort_ul.className='sort_ul'
  6058. var sort_ul_out
  6059. var sort_interval_count=0
  6060. var sort_ul_out_interval=setInterval(function(){
  6061. console.log('aaaaaa')
  6062. sort_ul_out=document.getElementsByClassName('sc-l7cibp-0 juyBTC')[0]//搜索界面“预览图”框架的ul元素的父元素
  6063. if(sort_ul_out!=null){
  6064. if(document.getElementsByClassName('sc-l7cibp-3 gCRmsl')!=null){
  6065. sort_ul_out.insertBefore(sort_ul,document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0])
  6066. }
  6067. document.getElementsByClassName('sc-l7cibp-1 krFoBL')[0].style.display='none'
  6068.  
  6069. document.getElementsByClassName('sc-xhhh7v-0 kYtoqc')[0].addEventListener('click',function(e){
  6070. console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
  6071. if(document.getElementById('sort_ul')!=null){
  6072. document.getElementById('sort_ul').innerHTML=""
  6073. setTimeout(function(){
  6074. single_sort()
  6075. },2000)
  6076. }
  6077. })
  6078.  
  6079. var keyword=window.location.href.match(/(?<=tags\/).*?(?=\/)/)[0]
  6080. //var mode='all'
  6081. var order='date_desc'
  6082. var page=1
  6083. var s_mode='exact_match_for_tags'
  6084. //if(window.location.href.match(/(?<=mode=)(safe|all|r18)/)!=null){
  6085. //mode=window.location.href.match(/(?<=mode=)(safe|all|r18)/)[0]
  6086. //}
  6087. if(window.location.href.match(/(?<=order=)(date|date_d)/)!=null){
  6088. order=window.location.href.match(/(?<=order=)(date|date_d)/)[0]
  6089. }
  6090. if(window.location.href.match(/(?<=p=)\d+/)!=null){
  6091. page=parseInt(window.location.href.match(/(?<=p=)\d+/)[0])
  6092. }
  6093. if(window.location.href.match(/(?<=s_mode=)s_tag/)!=null){
  6094. s_mode='partial_match_for_tags'
  6095. }
  6096. var one_sort_url='https://api.moedog.org/pixiv/v2/?type=search&word='+keyword+'&order='+order+'&mode='+s_mode+'&page='
  6097. //console.log(one_sort_url)
  6098. //https://api.moedog.org/pixiv/v2/?type=search&word=%E9%A3%8E%E6%99%AF&order=date_desc&page=1
  6099. GM_xmlhttpRequest({
  6100. method: "GET",
  6101. url: one_sort_url+(page*2-1).toString(),
  6102. headers:{
  6103. "User-Agent": navigator.userAgent,
  6104. },
  6105. onload: function(res) {
  6106. if(res.status === 200){
  6107. //console.log('成功')
  6108. var p1=res.responseText
  6109. p1=JSON.parse(p1.replace('\\/','/'))
  6110. console.log(p1)
  6111. var one_fetch_result=[]
  6112. var one_count=0
  6113. //var k=0;
  6114. for(var e=0;e<p1.illusts.length;e++){
  6115. var total_bookmarks=p1.illusts[e].total_bookmarks
  6116. var illust_id=p1.illusts[e].id
  6117. var title=p1.illusts[e].title
  6118. var illust_img=p1.illusts[e].image_urls.square_medium
  6119. var page_count=p1.illusts[e].page_count
  6120. var illust_type=0
  6121. if(p1.illusts[e].type=='ugoira'){
  6122. illust_type=2
  6123. }
  6124. var illust_r18=false
  6125. if(JSON.stringify(p1.illusts[e].tags).match(/(R18|R\-18)/)){
  6126. illust_r18=true
  6127. }
  6128. var illust_restrict=2
  6129. var author_id=p1.illusts[e].user.id
  6130. var author_name=p1.illusts[e].user.name
  6131. if(one_fetch_result[total_bookmarks]==null){
  6132. one_fetch_result[total_bookmarks]=total_bookmarks+';'+illust_id+';'+title+';'+illust_img+';'+page_count+';'+illust_type+';'+illust_r18+';'+illust_restrict+';'+author_id+';'+author_name
  6133. }
  6134. else{
  6135. one_fetch_result[total_bookmarks]=one_fetch_result[total_bookmarks]+'*'+total_bookmarks+';'+illust_id+';'+title+';'+illust_img+';'+page_count+';'+illust_type+';'+illust_r18+';'+illust_restrict+';'+author_id+';'+author_name
  6136. }
  6137. }
  6138.  
  6139. GM_xmlhttpRequest({
  6140. method: "GET",
  6141. url: one_sort_url+(page*2).toString(),
  6142. headers:{
  6143. "User-Agent": navigator.userAgent,
  6144. },
  6145. onload: function(res) {
  6146. if(res.status === 200){
  6147. //console.log('成功')
  6148. var p2=res.responseText
  6149. p2=JSON.parse(p2.replace('\\/','/'))
  6150. console.log(p2)
  6151. for(var e=0;e<p2.illusts.length;e++){
  6152. var total_bookmarks=p2.illusts[e].total_bookmarks
  6153. var illust_id=p2.illusts[e].id
  6154. var title=p2.illusts[e].title
  6155. var illust_img=p2.illusts[e].image_urls.square_medium
  6156. var page_count=p2.illusts[e].page_count
  6157. var illust_type=0
  6158. if(p2.illusts[e].type=='ugoira'){
  6159. illust_type=2
  6160. }
  6161. var illust_r18=false
  6162. if(JSON.stringify(p2.illusts[e].tags).match(/(R18|R\-18)/)){
  6163. illust_r18=true
  6164. }
  6165. var illust_restrict=2
  6166. var author_id=p2.illusts[e].user.id
  6167. var author_name=p2.illusts[e].user.name
  6168. if(one_fetch_result[total_bookmarks]==null){
  6169. one_fetch_result[total_bookmarks]=total_bookmarks+';'+illust_id+';'+title+';'+illust_img+';'+page_count+';'+illust_type+';'+illust_r18+';'+illust_restrict+';'+author_id+';'+author_name
  6170. }
  6171. else{
  6172. one_fetch_result[total_bookmarks]=one_fetch_result[total_bookmarks]+'*'+total_bookmarks+';'+illust_id+';'+title+';'+illust_img+';'+page_count+';'+illust_type+';'+illust_r18+';'+illust_restrict+';'+author_id+';'+author_name
  6173. }
  6174. }
  6175. console.log(one_fetch_result)
  6176.  
  6177. one_fetch_result = one_fetch_result.filter(function (s) {
  6178. if(s&&s.trim()){
  6179. return true
  6180. }
  6181. else{
  6182. return false
  6183. }
  6184. })
  6185. //console.log(one_fetch_result)
  6186. var one_sort=[]
  6187. var one_sort_count=0
  6188. for(var u=one_fetch_result.length-1;u>=0;u--){
  6189. if(one_fetch_result[u].match(/\*/)!=null){
  6190. for(var v=0;v<=one_fetch_result[u].match(/\*/g).length;v++){
  6191. one_sort[one_sort_count]=one_fetch_result[u].split('*')[v]
  6192. one_sort_count++
  6193. }
  6194. }
  6195. else{
  6196. one_sort[one_sort_count]=one_fetch_result[u]
  6197. one_sort_count++
  6198. }
  6199. }
  6200. console.log(one_sort)
  6201.  
  6202. document.getElementsByClassName('sc-l7cibp-1 krFoBL')[0].style.display='none'
  6203. for(u=0;u<one_sort.length;u++){
  6204. var one_split=one_sort[u].split(';')
  6205. //sort_addillust(bookmark,illustID,illustName,illustImg,illustNumber,illustType,R_18,illustRestrict,authorID,authorName){
  6206. sort_addillust(one_split[0],one_split[1],one_split[2],one_split[3],one_split[4],one_split[5],one_split[6],one_split[7],one_split[8],one_split[9])
  6207. }
  6208. }
  6209. }
  6210. })
  6211. }
  6212. else{
  6213. console.log("error1")
  6214. }
  6215. }
  6216. })
  6217. clearInterval(sort_ul_out_interval)
  6218. }
  6219. sort_interval_count++
  6220. if(sort_interval_count==100){
  6221. clearInterval(sort_ul_out_interval)
  6222. return
  6223. }
  6224. sort_ul_out.appendChild(sort_ul)
  6225. },100)
  6226. }
  6227.  
  6228. window.addEventListener('load',function(e){
  6229. if(window.location.href.match(/https\:\/\/www\.pixiv\.net\/tags\/.*?\//)&&getCookie("singleSort")==1){
  6230. single_sort()
  6231. }
  6232. })
  6233.  
  6234.  
  6235. function bookmarks_readd(target){
  6236. isProhibit=0//0为未屏蔽,1为屏蔽
  6237. var cookie_tag_safe=[]
  6238. var id=target.src.match(/\d{6,10}/)[0]
  6239. GM_xmlhttpRequest({
  6240. method: "GET",
  6241. url: "https://www.pixiv.net/artworks/"+id,
  6242. headers:{
  6243. "User-Agent": navigator.userAgent,
  6244. },
  6245. onload: function(res) {
  6246. if(res.status === 200){
  6247. //console.log('成功')
  6248. var p=res.responseText
  6249. var final=p.match(/(?<="tag":").*?(?=")/g).toString().split(',')
  6250. if(GM_getValue('tagSaveSafe')==''){
  6251. var tag_cookie=tagSaveSafe.split('*')
  6252. }
  6253. else{
  6254. tag_cookie=GM_getValue('tagSaveSafe').split('*')
  6255. }
  6256. if(GM_getValue('tagProhibit')==''){
  6257. var tag_Prohibit=''
  6258. }
  6259. else{
  6260. tag_Prohibit=GM_getValue('tagProhibit')
  6261. }
  6262. cookie_tag_safe[0]='全部'
  6263. var count=1
  6264. if(getCookie('tagCookieSetting')==1){
  6265. for(var i=0;i<final.length;i++){
  6266. for(var j=0;j<tag_cookie.length;j++){
  6267. if(tag_Prohibit.match(final[i])!=null){
  6268. isProhibit=final[i];
  6269. break;
  6270. }
  6271. if(tag_cookie[j].match(final[i])!=null){
  6272. cookie_tag_safe[count]=tag_cookie[j].split(',')[0]
  6273. count++
  6274. }
  6275. }
  6276. if(isProhibit==1){
  6277. break;
  6278. }
  6279. }
  6280. }
  6281. if(isProhibit==0){
  6282. fetch("https://www.pixiv.net/ajax/illusts/bookmarks/add",{
  6283. headers: {
  6284. "accept": "application/json",
  6285. "content-type": "application/json; charset=utf-8",
  6286. "x-csrf-token": getCookie('token')
  6287. },
  6288. "referrer": "https://www.pixiv.net",
  6289. 'method':'POST',
  6290. 'body':JSON.stringify({illust_id: id, restrict: 0, comment: "", tags: cookie_tag_safe})//不确定restrict全年龄时的数值
  6291. })
  6292. loveTagView(cookie_tag_safe)
  6293. // event.target.closest('a').nextSibling.outerHTML=`<div class="sc-iasfms-2 eDNlMk"><div class=""><button type="button" class="sc-kgq5hw-0 fgVkZi"><svg viewBox="0 0 32 32" width="32" height="32" class="sc-j89e3c-1 bXjFLc"><path d="M21,5.5 C24.8659932,5.5 28,8.63400675 28,12.5 C28,18.2694439 24.2975093,23.1517313 17.2206059,27.1100183C16.4622493,27.5342993 15.5379984,27.5343235 14.779626,27.110148 C7.70250208,23.1517462 4,18.2694529 4,12.5C4,8.63400691 7.13400681,5.5 11,5.5 C12.829814,5.5 14.6210123,6.4144028 16,7.8282366C17.3789877,6.4144028 19.170186,5.5 21,5.5 Z" style=" fill: rgb(255, 64, 96);"></path><path d="M16,11.3317089 C15.0857201,9.28334665 13.0491506,7.5 11,7.5C8.23857625,7.5 6,9.73857647 6,12.5 C6,17.4386065 9.2519779,21.7268174 15.7559337,25.3646328C15.9076021,25.4494645 16.092439,25.4494644 16.2441073,25.3646326 C22.7480325,21.7268037 26,17.4385986 26,12.5C26,9.73857625 23.7614237,7.5 21,7.5 C18.9508494,7.5 16.9142799,9.28334665 16,11.3317089 Z" class="sc-j89e3c-0 dUurgf" style=" fill: rgb(255, 64, 96);"></path></svg></button></div></div>`
  6294. var button=event.target.closest('a').nextSibling.getElementsByTagName('button')
  6295. if(button.length==0){
  6296. button=event.target.closest('a').nextSibling.nextSibling.getElementsByTagName('button')[0]
  6297. }
  6298. else{
  6299. button=button[0]
  6300. }
  6301. if(button!=null){
  6302. button.childNodes[0].childNodes[0].style.fill='red'
  6303. button.childNodes[0].childNodes[1].style.fill='red'
  6304. }
  6305. }
  6306. else{
  6307. alert('包含屏蔽标签'+isProhibit)
  6308. }
  6309. }
  6310. }
  6311. })
  6312. }
  6313.  
  6314. function bookmarks_all_readd(){
  6315. var img=document.getElementsByClassName('sc-rp5asc-10 erYaF')//页面预览图className
  6316. var i=0;
  6317. setInterval(function(){
  6318. bookmarks_readd(img[i])
  6319. i++;
  6320. },200)
  6321. }
  6322.  
  6323. window.addEventListener('keydown',function(e){
  6324. if(e.keyCode==65&&e.altKey==true){
  6325. bookmarks_all_readd()
  6326. }
  6327. })
  6328.  
  6329. /*
  6330. window.addEventListener('keydown',function(e){
  6331. if(e.keyCode==65){
  6332.  
  6333. //原本搜索页ul元素
  6334. //document.getElementsByClassName('sc-l7cibp-3 gCRmsl')[0].style.display='none'//原本页面页码部分(换页)
  6335.  
  6336. single_sort()
  6337.  
  6338. }
  6339. })
  6340. var one_fetch_finish=setInterval(function(){
  6341. if(one_count==60){
  6342. one_fetch_result = one_fetch_result.filter(function (s) {
  6343. if(s&&s.trim()){
  6344. return true
  6345. }
  6346. else{
  6347. return false
  6348. }
  6349. })
  6350. //console.log(one_fetch_result)
  6351. var one_sort=[]
  6352. var one_sort_count=0
  6353. for(var u=one_fetch_result.length-1;u>=0;u++){
  6354. if(one_fetch_result[u].match(/;/)!=null){
  6355. for(var v=0;v<one_fetch_result[u].match(/;/g).length;v++){
  6356. one_sort[one_sort_count]=one_fetch_result[u].split(';')[v]
  6357. one_sort_count++
  6358. }
  6359. }
  6360. else{
  6361. one_sort[one_sort_count]=one_fetch_result[u]
  6362. one_sort_count++
  6363. }
  6364. }
  6365. console.log(one_sort)
  6366. clearInterval(one_fetch_finish)
  6367. }
  6368. },100)
  6369. */
  6370. })();