aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2021-07-09 15:09:27 +0300
committerAlex Shnitman <alexta69@gmail.com>2021-07-09 15:09:27 +0300
commit95c0195c22c7494b6f8674fca6dfe6d53406ab92 (patch)
tree2faa7a3de518d02a03605ff610dd672acec25b72 /README.md
parentupgraded youtube-dl (diff)
downloadmetube-95c0195c22c7494b6f8674fca6dfe6d53406ab92.tar.gz
metube-95c0195c22c7494b6f8674fca6dfe6d53406ab92.tar.bz2
metube-95c0195c22c7494b6f8674fca6dfe6d53406ab92.zip
firefox bookmarklet
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index de9cc1a..3997f46 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ Certain values can be set via environment variables, using the `-e` parameter on
## Bookmarklet
-[kushfest](https://github.com/kushfest) has created a bookmarklet for sending the currently open webpage to MeTube. Please note that if you're on an HTTPS page, your MeTube instance must be behind an HTTPS reverse proxy (see below) for the bookmarklet to work.
+[kushfest](https://github.com/kushfest) has created a Chrome bookmarklet for sending the currently open webpage to MeTube. Please note that if you're on an HTTPS page, your MeTube instance must be behind an HTTPS reverse proxy (see below) for the bookmarklet to work.
GitHub doesn't allow embedding JavaScript as a link, so the bookmarklet has to be created manually by copying the following code to a new bookmark you create on your bookmarks bar. Change the hostname in the URL below to point to your MeTube instance.
@@ -47,6 +47,11 @@ GitHub doesn't allow embedding JavaScript as a link, so the bookmarklet has to b
javascript:!function(){xhr=new XMLHttpRequest();xhr.open("POST","https://metube.domain.com/add");xhr.send(JSON.stringify({"url":document.location.href,"quality":"best"}));xhr.onload=function(){if(xhr.status==200){alert("Sent to metube!")}else{alert("Send to metube failed. Check the javascript console for clues.")}}}();
```
+[shoonya75](https://github.com/shoonya75) has contributed a Firefox version:
+```javascript
+javascript:(function(){xhr=new XMLHttpRequest();xhr.open("POST","https://metube.domain.com/add");xhr.send(JSON.stringify({"url":document.location.href,"quality":"best"}));xhr.onload=function(){if(xhr.status==200){alert("Sent to metube!")}else{alert("Send to metube failed. Check the javascript console for clues.")}}})();
+```
+
## Running behind a reverse proxy
Use the following nginx configuration to run MeTube behind a reverse proxy. The extra `proxy_set_header` directives are there to make WebSocket work. Don't forget to set the URL_PREFIX environment variable to the correct value as well.
bgstack15