Basic extension setup and basic downlading capability
This commit is contained in:
3
goodies/chrome-extension/.gitignore
vendored
Normal file
3
goodies/chrome-extension/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.zip
|
||||
*.rar
|
||||
*.6zip
|
25
goodies/chrome-extension/background.js
Normal file
25
goodies/chrome-extension/background.js
Normal 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
|
||||
});
|
||||
|
BIN
goodies/chrome-extension/icon/128.png
Normal file
BIN
goodies/chrome-extension/icon/128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
goodies/chrome-extension/icon/16.png
Normal file
BIN
goodies/chrome-extension/icon/16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
goodies/chrome-extension/icon/48.png
Normal file
BIN
goodies/chrome-extension/icon/48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
3
goodies/chrome-extension/lib/axios.js
Normal file
3
goodies/chrome-extension/lib/axios.js
Normal file
File diff suppressed because one or more lines are too long
2
goodies/chrome-extension/lib/jquery-3.5.1.min.js
vendored
Normal file
2
goodies/chrome-extension/lib/jquery-3.5.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
40
goodies/chrome-extension/manifest.json
Normal file
40
goodies/chrome-extension/manifest.json
Normal 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": [
|
||||
"*://*/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
29
goodies/chrome-extension/readme.md
Normal file
29
goodies/chrome-extension/readme.md
Normal 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
|
||||

|
||||
<br />
|
||||
|
||||
#### Course
|
||||

|
||||
<br />
|
||||
|
||||
#### Netmath quiz
|
||||

|
Reference in New Issue
Block a user