User:LBelo (WMB)/common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
function addStyleSheet(pageTitle, sucCallback) {
var cssLink = $("<link>");
$("head").append(cssLink);
cssLink.attr({
rel: "stylesheet",
type: "text/css",
href: "https://beta.wikiversity.org/w/index.php?action=raw&ctype=text/css&title=" + pageTitle
});
console.log('loading CSS file ' + pageTitle);
if (typeof sucCallback !== 'undefined') {
checkForStyleSheet(pageTitle, sucCallback);
}
}
/*####################
# MOOC
####################*/
// import CSS while not in global namespace
addStyleSheet('User:LBelo (WMB)/Common.css/addin-mooc.css');
// import new migrated JS
importScript('User:LBelo (WMB)/Common.js/addin-mooc.js');
/*####################
# GPGP
####################*/
// import CSS while not in global namespace
// addStyleSheet('User:LBelo (WMB)/Common.css/addin-gpgp.css');
// import new migrated JS
// importScript('User:LBelo (WMB)/Common.js/addin-gpgp.js');