Enote

Unhide answers at enotes website

  1. // ==UserScript==
  2. // @name Enote
  3. // @version 0.1.3.1
  4. // @description Unhide answers at enotes website
  5. // @author z0xyz
  6. // @match https://www.enotes.com/*
  7. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  8. // @run-at document-end
  9. // @namespace https://gf.qytechs.cn/users/813029
  10. // ==/UserScript==
  11.  
  12. function showFirstAnswer(){
  13. let firstAnswerDivs = document.getElementsByClassName('c-answer__body').item(0).getElementsByTagName('div')
  14. for (let i=0 ; i<firstAnswerDivs.length ; i++ ){
  15. let firstDivClass = firstAnswerDivs.item(i).classList.item(0)
  16. if ( firstDivClass != null && firstDivClass.slice(0,1) == '_' ){
  17. firstAnswerDivs.item(i).classList = ['none']
  18. }
  19. }
  20. }
  21.  
  22. function showRestOfTheAnswers(){
  23. let answerLength = document.getElementsByClassName('c-answer__body').length
  24. for (let i=1 ; i<answerLength ; i++){
  25. document.getElementsByClassName('c-answer__body').item(i).firstElementChild.classList = ['none']
  26. }
  27. }
  28.  
  29. function unblurArticles(){
  30. let divElements = document.getElementsByTagName('div')
  31. for (let i=0; i<divElements.length; i++){
  32. let currentDivElement = divElements.item(i)
  33. if (currentDivElement.className.slice(0,1) == '_'){
  34. currentDivElement.className = ''
  35. }
  36. }
  37. }
  38. try{
  39. showFirstAnswer()
  40. showRestOfTheAnswers()
  41.  
  42. }catch{
  43. console.log("This page isn't of answers type")
  44. }
  45. try{
  46. unblurArticles()
  47. }catch{
  48. console.log("This page isn't of articles type")
  49. }

QingJ © 2025

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