let commonDiv = document.createElement("DIV");
commonDiv.innerHTML = `
Customize your Managebac Plus here!
This is the ManageBac plus extension library, where you can enhance your experience further!
If you are a developer, feel free to create your own extension.
Loading extensions...
`;
document.body.appendChild(commonDiv);
chrome.storage.local.get(["loggedUser"], (res) => {
let loggedUser = res.loggedUser;
if(loggedUser == null){
document.getElementById("extensions").innerHTML = "Please refresh your managebac dashboard and come back. Thanks!";
}
});
$.post("http://zubatomic.com/projects/managebac/ajax", {cmd: "getExtensions"}, extensionRaw => {
extensions = [];
try{
extensions = JSON.parse(extensionRaw);
}catch(e){
console.error(e);
}
console.log(extensions);
});
/*
let developerDiv = document.createElement("DIV");
document.body.appendChild(developerDiv);
chrome.storage.local.get(["configDeveloperMode", "userCodeInject"], v => {
if(v.configDeveloperMode){
if(v.userCodeInject == null) v.userCodeInject = `let injectCss = c => {
let t = document.createElement("STYLE");
t.innerHTML = c;
document.head.appendChild(t);
}`;
developerDiv.innerHTML = `
Welcome to developer mode
Inject javascript code below:
Preferably code in a different code editor and then paste here.
JQuery is included in ManageBac
`;
let button = document.getElementById("uploadCodeButton");
button.onclick = evt => {
let textarea = document.getElementById("codeTextarea");
chrome.storage.local.set({userCodeInject: textarea.value}, r => {});
};
}
});
*/