From 0d5320f3eb58c5dab81746e50ea65afb1311f98b Mon Sep 17 00:00:00 2001 From: docentYT <63965954+docentYT@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:35:15 +0200 Subject: [PATCH 01/25] remove console.log --- .../combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js b/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js index 062cfd4..5664e86 100644 --- a/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js +++ b/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js @@ -1,6 +1,5 @@ function main() { let planLekcji = document.getElementsByClassName("plan-lekcji")[0]; - console.log(planLekcji) let headers = planLekcji.getElementsByTagName("thead")[0].getElementsByTagName("tr")[0]; let saturdayString = headers.childNodes[headers.childNodes.length-3].lastChild.textContent; From af7e8b1c5335da7b5d98d57f52248146213448e8 Mon Sep 17 00:00:00 2001 From: docentYT <63965954+docentYT@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:37:19 +0200 Subject: [PATCH 02/25] english variable name --- .../combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js b/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js index 5664e86..50dd677 100644 --- a/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js +++ b/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js @@ -1,6 +1,6 @@ function main() { - let planLekcji = document.getElementsByClassName("plan-lekcji")[0]; - let headers = planLekcji.getElementsByTagName("thead")[0].getElementsByTagName("tr")[0]; + let timetable = document.getElementsByClassName("plan-lekcji")[0]; + let headers = timetable.getElementsByTagName("thead")[0].getElementsByTagName("tr")[0]; let saturdayString = headers.childNodes[headers.childNodes.length-3].lastChild.textContent; let saturday = new Date(saturdayString).setHours(0,0,0,0); From 04ca3d8136bf00a0a986145579a6f9d3750c6188 Mon Sep 17 00:00:00 2001 From: docentYT <63965954+docentYT@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:40:45 +0200 Subject: [PATCH 03/25] removed unnessesary comment --- .../combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js b/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js index 50dd677..1178afa 100644 --- a/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js +++ b/extensions/combined/src/przegladaj_plan_lekcji/nextWeekAtWeekend.js @@ -14,6 +14,4 @@ function main() { zmienTydzien(1); // function from original librus site } } -document.addEventListener("DOMContentLoaded", main); - -// main(); \ No newline at end of file +document.addEventListener("DOMContentLoaded", main); \ No newline at end of file From ec81cca97197bcbf771eea562243252d2db24c49 Mon Sep 17 00:00:00 2001 From: docentYT <63965954+docentYT@users.noreply.github.com> Date: Sat, 23 Sep 2023 15:32:45 +0200 Subject: [PATCH 04/25] popup revisited --- extensions/combined/background.js | 10 +- extensions/combined/src/popup/popup.css | 70 +++++++++++++ extensions/combined/src/popup/popup.html | 123 ++++++++--------------- extensions/combined/src/popup/popup.js | 8 +- 4 files changed, 126 insertions(+), 85 deletions(-) create mode 100644 extensions/combined/src/popup/popup.css diff --git a/extensions/combined/background.js b/extensions/combined/background.js index 7121f9b..bf8e20e 100644 --- a/extensions/combined/background.js +++ b/extensions/combined/background.js @@ -18,4 +18,12 @@ chrome.webNavigation.onCreatedNavigationTarget.addListener(async (details) => { files: ["przegladaj_plan_lekcji.inject-script.js"], world: "MAIN" }); -}, filter); \ No newline at end of file +}, filter); + +// chrome.runtime.onMessage.addListener( +// function(request, sender, sendResponse) { +// if (request.message == "saveSettings") { + +// } +// } +// ) \ No newline at end of file diff --git a/extensions/combined/src/popup/popup.css b/extensions/combined/src/popup/popup.css new file mode 100644 index 0000000..847e699 --- /dev/null +++ b/extensions/combined/src/popup/popup.css @@ -0,0 +1,70 @@ +body { + background-color: #282922; + color: white; + width: 300px; +} + +table { + border-collapse: collapse; + font-size: 12px; +} + +tr { + border-bottom: 1px #a4c800 solid; +} + +tr:last-child { + border-bottom: none !important; +} + +tr:hover { + background-color: #303030; +} + +tr:last-child:hover { + background-color: #282922 !important; +} + +input[type=number], input[type=submit] { + background-color: #303030; + color: white; + border-radius: 5px; + border: 1px #a4c800 solid; + width: 50px; +} + +input[type=submit]:hover { + background-color: #a4c800; +} + +input[type=submit] { + margin-top: 5px; + padding: 0px; + height: 25px; +} + +input[type=checkbox] { + height: 25px; + width: 25px; +} + + +input[type=checkbox]:checked:before { + color: black !important; +} + +/* unvisited and visited link */ +a:link, a:visited { + color: #a4c800; +} + +a:hover, a:active { + color: #e2fb72; +} + +footer { + display: flex; + justify-content: space-around; + align-items: center; + margin-top: 10px; +} \ No newline at end of file diff --git a/extensions/combined/src/popup/popup.html b/extensions/combined/src/popup/popup.html index ad5081d..efe0a35 100644 --- a/extensions/combined/src/popup/popup.html +++ b/extensions/combined/src/popup/popup.html @@ -3,93 +3,50 @@
- +