Last active
June 22, 2017 04:38
-
-
Save sijpkes/d80e21db66320379d581ccd93afca42e to your computer and use it in GitHub Desktop.
Host this somewhere to load into your blackboard item (see bb_item.html)
This file contains 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 characters
(function(){ | |
"use strict"; | |
var cssId = "aHR0cHM6Ly91b25saW5lLm5ld2Nhc3RsZS5lZHUuYXUvYmJjc3dlYmRhdi94aWQtMTEwNzQwOTJfMQ=="; | |
if (!document.getElementById(cssId)) | |
{ | |
var role = $("role").value; | |
var url = $("styurl").readAttribute("href"); | |
var head = document.getElementsByTagName("head")[0]; | |
var link = document.createElement("link"); | |
link.id = cssId; | |
link.rel = "stylesheet"; | |
link.type = "text/css"; | |
link.href = url; | |
link.media = "all"; | |
head.appendChild(link); | |
/* set this to whatever your team's role is in Blackboard.*/ | |
if(role !== "MY_TEAM_ROLE") { | |
var $element = $("bold_script"); // you change this id in the item if you wish. | |
var closest = $element.match("li") ? $element : $element.up("li.clearfix"); | |
closest.writeAttribute("style", "display: none"); | |
} | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment