Could anyone help me make a user-script that changes threads that I am not interested in? Like I really don't care about "dox" or "ddos".. so how do I make a user-script that alter those kinda thread titles to maybe like a "red ink" or "CANCER! DON'T READ" or something? (I just started coding and am only familiar with JS)
|
Help
Userscript Request |
(May 13, 2015 05:14 PM)Rokushi Wrote: Okay its more of like the css part I am having issues with lol... so I understand how to check element and append textWhat issues are you having exactly? You can change the element's text color to red like this: Code element.style.color = 'red';(May 13, 2015 07:14 PM)Mr.Steven Wrote: What issues are you having exactly?Would this work then? Code var title = document.getElementsByClassName('subject_new')(May 14, 2015 09:05 AM)Rokushi Wrote: Would this work then?It's an array so you would have to loop through all the titles, here's an example. You can open the console in your browser and test it right away, make sure you write the keyword in lowercase. Code var titles = document.getElementsByClassName('subject_new')
May 14, 2015 09:40 AM
(This post was last modified: May 14, 2015 09:50 AM by Rokushi.)
Code var new = document.getElementsByClassName('subject_new')right? Note: that didnt work either :/ Im on Mozilla so I use inner.text instead of inner.HTML
May 14, 2015 10:44 AM
(This post was last modified: May 14, 2015 10:48 AM by Mr.Steven.)
(May 14, 2015 09:40 AM)Rokushi Wrote: Note: that didnt work either :/innerHTML works fine on Mozilla. I went a step further and made a code which should make these threads invisible since you don't want to read them at all, all you need to do is specify the keywords, it works both on Chrome and Mozilla fine. Maybe someone else finds this useful aswell. Code var titles = document.querySelectorAll(".subject_new, .subject_old")
Cheers mate thx for the help 🤝
where do you think I could get a better understanding of the DOM? I have been dabbling around on some sites and read a little bit on w3schools... This is more of a fun thing then important haha... don't really care for website designing but you have helped me learn! |
|
|



