-
-
Save as-com/bd5ab8869cfa9c1a163cd41ff831d32b to your computer and use it in GitHub Desktop.
Revisions
-
as-com renamed this gist
Jul 20, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
GarethPW revised this gist
Jul 18, 2017 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,24 @@ // ==UserScript== // @name Scratch 2.0 Discuss Button Fix // @namespace http://garethpw.net // @version 1.1 // @description Brings back the discuss button on the site header because removing it was illogical. // @author Gareth Welch // @include /^https?:\/\/scratch\.mit\.edu // ==/UserScript== (function() { var nav = document.querySelector("#topnav ul.site-nav, #navigation .inner>ul"); var discuss = document.createElement("li"); var discuss_a = discuss.appendChild( document.createElement('a') ); discuss_a.setAttribute("href", "/discuss/"); discuss_a.innerText = "Discuss"; if (nav.className === "site-nav") { nav.insertBefore(discuss, nav.children[2]); } else { discuss.className = "link discuss"; nav.insertBefore(discuss, nav.querySelector("li.tips")); } })(); -
GarethPW created this gist
Jul 18, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ // ==UserScript== // @name Scratch 2.0 Discuss Button Fix // @namespace http://garethpw.net // @version 1.0 // @description Brings back the discuss button on the site header because removing it was illogical. // @author Gareth Welch // @include /^https?:\/\/scratch\.mit\.edu // ==/UserScript== (function() { var nav = document.querySelector("#topnav ul.site-nav"); var discuss = document.createElement("li"); var discuss_a = discuss.appendChild( document.createElement('a') ); discuss_a.setAttribute("href", "/discuss/"); discuss_a.innerText = "Discuss"; nav.insertBefore(discuss, nav.children[2]); })();