Merge pull request #5 from Leonetienne/develop

Added 'take-me-home'-button to chrome extension and updated Readme
This commit is contained in:
Leon Etienne 2021-03-13 19:24:36 +01:00 committed by GitHub
commit fad583b2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 8 deletions

View File

@ -35,6 +35,12 @@ Have a sneak peak!
![mobile](https://raw.githubusercontent.com/Leonetienne/Tubio/master/github-media/mobile.png)
## NEW! Get the Chrome Companion Extension!
![extension-popup](https://raw.githubusercontent.com/Leonetienne/Tubio/master/github-media/chromeext-popup.png)
![extension-contextmenu](https://raw.githubusercontent.com/Leonetienne/Tubio/master/github-media/chromeext-context.png)
## How can i configure it?
See this json file (config.json).
Most of these values are configurable in the web-interface, but not all, such as the port.

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@ -1,6 +1,6 @@
body {
width: 300px;
height: 310px;
height: 340px;
margin: 0 !important;
}
body .bgmask {

View File

@ -14,7 +14,7 @@ button.small {
}
button:hover {
transform: scale(1.075);
transform: scale(1.035);
color: #fff;
background-color: #5954a4;
}

View File

@ -24,14 +24,16 @@
<div class="flex flex-col align-items-center">
<!-- Download this - button -->
<button class="special" id="button-download" title="Will download this pages URL as a video of highest quality.">
<button class="special" id="button--download" title="Will download this pages URL as a video of highest quality.">
Download!
</button>
<button class="small" id="button--take-me-home" style="margin-top: 0.5em;">Take me to my downloads</button>
<!-- Tubio config form -->
<label for="tubio-address" style="margin-top: 3em;">Where can i reach tubio?</label>
<input type="text" id="tubio-address" class="text-center" />
<button class="small" id="button-save-settings" style="margin-top: 0.5em;">Save settings</button>
<button class="small" id="button--save-settings" style="margin-top: 0.5em;">Save settings</button>
</div>
</div>

View File

@ -1,6 +1,6 @@
$("#button-download").click(function() {
$("#button--download").click(function() {
$("#button-download").addClass("lock");
$("#button--download").addClass("lock");
// Query active tab in active window...
chrome.windows.getCurrent(function(w) {
@ -25,8 +25,14 @@ chrome.storage.local.get(['tubio_address'], function(result) {
$("#tubio-address").val(result.tubio_address);
});
$("#button-save-settings").click(function() {
$("#button--save-settings").click(function() {
chrome.storage.local.set({
tubio_address: $("#tubio-address").val()
});
});
$("#button--take-me-home").click(function() {
chrome.storage.local.get(['tubio_address'], function(result) {
chrome.tabs.create({url: result.tubio_address});
});
});

View File

@ -1,5 +1,5 @@
# Chrome Extension for Tubio
Adds a context-menu and a popup to download videos instantly.
It does not open tubio for you. It just downloads the videos.
It does not open Tubio for you. It just downloads the videos. But you can click a button in the extensions popup that takes you to Tubio.
For now this is not on the chrome store, but you can easily install unlisted extensions from source as shown [here](https://developer.chrome.com/docs/extensions/mv2/faq/#:~:text=Click%20the%20Chrome%20menu%20icon,a%20packaged%20extension%2C%20and%20more.).