schoolbox web extension :)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

revert: remove hide-pfp plugin (replaced by snippet)

Willow 19bc42a5 2f5ff2ff

-46
-34
src/plugins/hide-pfp/hide-pfp-end.js
··· 1 - // get the id "profile-drop" 2 - let profileDrop = document.getElementById("profile-drop"); 3 - let profileImage = getChildNode(profileDrop, 1, "IMG"); 4 - // change image source to /Assets/guest.png 5 - profileImage.src = chrome.runtime.getURL("assets/guest.png"); 6 - 7 - // do again for the class "profile-drop" 8 - profileDrop = document.getElementsByClassName("profile-drop")[0]; 9 - profileImage = getChildNode(profileDrop, 1, "IMG"); 10 - profileImage.src = chrome.runtime.getURL("assets/guest.png"); 11 - 12 - // Delete the stylesheet that hides the profile pictures 13 - css = document.getElementsByClassName("profile-picture")[0]; 14 - css.remove(); 15 - 16 - // ----------------- Functions ----------------- // 17 - function getChildNode(node, childNum, nodeName = null) { 18 - let childCounter = 0; 19 - for (let i = 0; i < node.childNodes.length; i++) { 20 - // If node type is an element node 21 - if (node.childNodes[i].nodeType === 1) { 22 - if (nodeName) { 23 - if (node.childNodes[i].nodeName === nodeName) { 24 - childCounter++; 25 - } 26 - } else { 27 - childCounter++; 28 - } 29 - if (childCounter === childNum) { 30 - return node.childNodes[i]; 31 - } 32 - } 33 - } 34 - }
-5
src/plugins/hide-pfp/hide-pfp-start.js
··· 1 - let css = document.createElement("link"); 2 - css.rel = "stylesheet"; 3 - css.href = chrome.runtime.getURL("/plugins/hide-pfp/hide-pfp.css"); 4 - css.classList.add("profile-picture", "schooltape"); 5 - document.head.appendChild(css);
-7
src/plugins/hide-pfp/hide-pfp.css
··· 1 - #profile-drop > img { 2 - display: none; 3 - } 4 - 5 - #profile-accordion > img { 6 - display: none; 7 - }