Base version

Добавил базовую версию расширения

-Скрипт сам запускается по загрузке страницы
-Иногда работает только после перезагрузки
This commit is contained in:
FutureX 2018-04-12 23:41:11 +03:00
commit 1bf62658de
5 changed files with 36 additions and 0 deletions

9
background.js Normal file
View File

@ -0,0 +1,9 @@
$.get(chrome.extension.getURL('/injected.js'),
function(data) {
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.innerHTML = data;
document.getElementsByTagName("head")[0].appendChild(script);
document.getElementsByTagName("body")[0].setAttribute("onLoad", "injected_main();");
}
);

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

5
injected.js Normal file
View File

@ -0,0 +1,5 @@
function injected_main() {
$('*[class^="correct"]').show().removeClass("ng-hide").parent().show().removeClass("ng-hide");
$("table.ng-hide").removeClass("ng-hide");
$("section").css("user-select","initial");
}

2
jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

20
manifest.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "LMS helper ♥",
"description": "Easy answers from your heart. Made with love by FutureX",
"version": "1.4.8.8",
"manifest_version": 2,
"browser_action": {
"default_icon": "icon.png"
},
"content_scripts": [
{
"matches": [ "*://www.cambridgelms.org/*" ],
"js": [ "jquery.js", "background.js" ],
"run_at": "document_end",
"all_frames": true
}
],
"web_accessible_resources": [
"/injected.js"
]
}