[vlc-commits] lua/http: use correct mobile interface URL to generate QR code
Pierre Ynard
git at videolan.org
Tue Aug 18 17:18:34 CEST 2020
vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Aug 18 16:52:53 2020 +0200| [d7e085b3add37d3ab76d390b0f8409b22c088f71] | committer: Pierre Ynard
lua/http: use correct mobile interface URL to generate QR code
This was not just hardcoded, it failed if the web interface was accessed
with a query string or a URL fragment for example.
(cherry picked from commit ddf1bc3cbaef16fd9bea3155d37683d94eeac01c)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d7e085b3add37d3ab76d390b0f8409b22c088f71
---
share/lua/http/js/ui.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/lua/http/js/ui.js b/share/lua/http/js/ui.js
index 83e5c23294..b81674ab36 100644
--- a/share/lua/http/js/ui.js
+++ b/share/lua/http/js/ui.js
@@ -100,7 +100,7 @@ $(function () {
{
return true;
}
- var urlimg = location.href + 'mobile.html';
+ var urlimg = $('#mobileintflink').prop('href');
var codeimg = $('<img width="350" height="350" alt="qrcode"/>');
codeimg.attr('src', 'https://chart.apis.google.com/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl=' + encodeURIComponent(urlimg));
codeimg.dialog({width: 350, height: 350, title: 'QR-Code'});
More information about the vlc-commits
mailing list