WorldLanguagesArchive / isOnlineBETA

This repository was used back then when branches were seemed as a weird thing. From now on we're just using branches on the main repo,
https://github.com/WorldLanguages/isOnlinev2/tree/develop
3 stars 4 forks source link

add an extra feature #22

Closed DeleteThisAcount closed 7 years ago

DeleteThisAcount commented 7 years ago

for the message page // ==UserScript== // @name Highlight New Notifications // @version 0.1 // @description Highlights new notifications in the updated /messages page on Scratch // @author jokebookservice1 // @match https://scratch.mit.edu/messages/ // ==/UserScript== let css = document.createElement("STYLE");css.appendChild(document.createTextNode(".mod-unread{background-color: #b8eafc;}"));document.body.appendChild(css);

ed-cooper commented 7 years ago

Using let on the global scope doesn't make sense - it has no difference to var there so you might as well just do that and then not worry about compatibility.

Also, why did you make STYLE uppercase?

joker314 commented 7 years ago

I (author of userscript) made "STYLE" uppercase because it's a tag name, and while in this particular context it makes no difference, tags are spelt in uppercase in JavaScript (see Node.tagName), and I want my code to be consistent (even though here it doesn't matter).

As for "let" vs "var" -- I don't know. If we want compatibility, too late. We use "let" almost everywhere, possibly my fault, I've read that "var" tends to have some quirks, so I just generally avoid it. We only support Chrome and Firefox, most people auto update, so it should be fine either way. However, we could change it if you wish.

DeleteThisAcount commented 7 years ago

so will this happen?

Sheshank-s commented 7 years ago

no. i have asked already before, and they have decided not to do it.