Base version
Добавил базовую версию расширения -Скрипт сам запускается по загрузке страницы -Иногда работает только после перезагрузки
This commit is contained in:
commit
1bf62658de
9
background.js
Normal file
9
background.js
Normal 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();");
|
||||||
|
}
|
||||||
|
);
|
5
injected.js
Normal file
5
injected.js
Normal 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
2
jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
20
manifest.json
Normal file
20
manifest.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user