Skip to content

Commit

Permalink
0.3.4
Browse files Browse the repository at this point in the history
Poprawione srednie popraw, obejscie x-frame-options
  • Loading branch information
msxmine authored Dec 15, 2017
1 parent be65840 commit 6e4d331
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
9 changes: 7 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Edziennik-plus",
"description": "Więcej funkcji w dzienniku elektronicznym",
"version": "0.3.3",
"version": "0.3.4",
"icons": {"128":"icon.png"},
"author": "MS",
"options_ui": {
Expand Down Expand Up @@ -45,12 +45,17 @@
"permissions": [
"storage",
"tabs",
"webRequest",
"webRequestBlocking",
"https://synergia.librus.pl/*"
],
"background": {
"scripts": ["tlo.js"]
},
"applications": {
"gecko": {
"id": "edziennikplus@msx",
"update_url": "https://github.com/msxmine/edziennik-plus/blob/updates/updates.json"
"update_url": "https://raw.githubusercontent.com/msxmine/edziennik-plus/updates/updates.json"
}
}
}
4 changes: 3 additions & 1 deletion oceny.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function Ocena(adres)
}
else
{
/*
if (adres.parentElement.parentElement.nodeName == "SPAN")
{
var wagasub = 0; //waga wszystkich zbiorowych
Expand All @@ -86,8 +87,9 @@ function Ocena(adres)
this.waga = (wagasub / iloscistotnych) / iloscistotnych
}
else{
*/
this.waga = tab[tab.indexOf("Waga")+1];
}
//}
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions tlo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

function zmienNaglowek(req) {
var mojNaglowek = {
name: "X-Frame-Options",
value: "SAMEORIGIN"
};
req.responseHeaders.push(mojNaglowek);
return {responseHeaders: req.responseHeaders};
}

browser.webRequest.onHeadersReceived.addListener(
zmienNaglowek,
{urls: ["https://synergia.librus.pl/przegladaj_plan_lekcji"]},
["blocking", "responseHeaders"]
);

0 comments on commit 6e4d331

Please sign in to comment.