sf

try to take over the world!

  1. // ==UserScript==
  2. // @name sf
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://segmentfault.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. console.log('version')
  15.  
  16.  
  17. $('.pager').append('<button id="sad">click me open all tag</button>')
  18.  
  19. $('.pager').append('<input id="sadinput" > </input>')
  20. $('.pager').append('<button id="submit">open</button>')
  21. var aList = []
  22. let flist = []
  23.  
  24.  
  25. $('#sad').click(function(){
  26.  
  27.  
  28. for (var i=0;i<$('.news__item-info a').length;i++){
  29. aList.push($('.news__item-info a')[i].href)
  30.  
  31. }
  32.  
  33. let setlist = new Set(aList)
  34. console.log(setlist)
  35. flist = Array.from(setlist)
  36. console.log(flist.length)
  37. $('.pager').append('<div>'+flist.length+'</div>')
  38.  
  39. })
  40.  
  41. $('#submit').click(function(){
  42. let amid = $('#sadinput').val().split(',')
  43. console.log(amid)
  44.  
  45. for(var j=amid[0];j<amid[1];j++){
  46. console.log(1)
  47. window.open(flist[j], "_blank")
  48.  
  49. }
  50.  
  51.  
  52.  
  53. })
  54.  
  55.  
  56.  
  57. // Your code here...
  58. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址