Basic extension setup and basic downlading capability

This commit is contained in:
Leonetienne
2021-03-13 16:24:16 +01:00
parent 2914c3762b
commit 43a779f6ec
9 changed files with 102 additions and 0 deletions

3
goodies/chrome-extension/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.zip
*.rar
*.6zip

View File

@@ -0,0 +1,25 @@
function Queue(info) {
// Select either the current page location, or the target of a href (if the user clicked on one)
urlToDownload = typeof(info.linkUrl) != 'undefined' ? info.linkUrl : info.pageUrl;
axios.post("http://tub.io/api", {
request: "queue_download",
video_url: urlToDownload,
mode: "video",
quality: "best"
}).then(function(response){
console.log("Queued successfully...");
}).catch(function(response){
console.log("Something went wrong...");
console.log(response);
});
}
chrome.contextMenus.create({
"title" : "Queue in Tubio",
"contexts": ["all"],
"type" : "normal",
"onclick" : Queue
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,40 @@
{
"manifest_version": 2,
"name": "Tubio - Companion Extension",
"version": "1.0",
"icons": {
"16": "icon/16.png",
"48": "icon/48.png",
"128": "icon/128.png"
},
"permissions": [
"background",
"contextMenus",
"webRequest",
"*://*/*"
],
"background": {
"scripts": [
"lib/axios.js",
"background.js"
]
},
"content_scripts": [
{
"run_at": "document_end",
"js": [
"lib/jquery-3.5.1.min.js",
"lib/axios.js"
],
"css": [
],
"matches": [
"*://*/*"
]
}
]
}

View File

@@ -0,0 +1,29 @@
# Moodle dark theme
I wanted a dark-theme for moodle so i made this lol
This custom stylesheet is specifically made for the Moodle installation of [Hochschule Worms](https://www.hs-worms.de). It may or may not work with other instances.
!!! This is an alpha version!! It is highly likely that there are some classes that are not yet or only partially "darkened" which can lead to bad readability (such as white background + white font).
## How to install
1) Download the repository root somewhere
2) If zipped, extract it
3) Go to your chrome extension settings (`chrome://extensions`)
4) If needed, adjust your moodle url in `manifest.json`
5) Click "Load unzipped extension" or whatever it reads in english. The left button...
6) Select the repository root directory
7) Profit.
...
8) Every time you change something in the extension source, you have to click reload on the settings page (`chrome://extensions`), and then refresh the affected tabs for it to take effect.
## Previews
#### Dashboard
![Dasboard](https://raw.githubusercontent.com/Leonetienne/moodle-nightmode/master/git-resources/dashboard.png)
<br />
#### Course
![Course](https://raw.githubusercontent.com/Leonetienne/moodle-nightmode/master/git-resources/course.png)
<br />
#### Netmath quiz
![Netmath quiz](https://raw.githubusercontent.com/Leonetienne/moodle-nightmode/master/git-resources/netmath.png)