mirror of
https://github.com/aunefyren/wrapperr
synced 2025-01-10 08:38:43 +00:00
Added link mode to order
This commit is contained in:
parent
93a81ec68d
commit
61ec923ad9
1 changed files with 10 additions and 4 deletions
|
@ -289,7 +289,7 @@ function get_user_links(cookie) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contact the Wrapperr API and get configuration details. Start processes based on the result
|
// Contact the Wrapperr API and get configuration details. Start processes based on the result
|
||||||
function get_wrapper_version() {
|
function get_wrapper_version(link_mode, hash) {
|
||||||
|
|
||||||
var xhttp = new XMLHttpRequest();
|
var xhttp = new XMLHttpRequest();
|
||||||
xhttp.onreadystatechange = function() {
|
xhttp.onreadystatechange = function() {
|
||||||
|
@ -342,12 +342,18 @@ function get_wrapper_version() {
|
||||||
|
|
||||||
// Set the 'configured' option in the JS variable
|
// Set the 'configured' option in the JS variable
|
||||||
wrapperr_configured = result.wrapperr_configured;
|
wrapperr_configured = result.wrapperr_configured;
|
||||||
|
|
||||||
if(result.wrapperr_root != "") {
|
if(result.wrapperr_root != "") {
|
||||||
api_url = window.location.origin + "/" + result.wrapperr_root + "/api/";
|
api_url = window.location.origin + "/" + result.wrapperr_root + "/api/";
|
||||||
console.log("URL: " + api_url)
|
console.log("URL: " + api_url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If link mode, call the API and return form here
|
||||||
|
if(link_mode) {
|
||||||
|
wrapped_link_actions(hash);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Change search function to use Plex search instead
|
// Change search function to use Plex search instead
|
||||||
if(!result.plex_auth) {
|
if(!result.plex_auth) {
|
||||||
wrapperr_search_function();
|
wrapperr_search_function();
|
||||||
|
@ -474,4 +480,4 @@ function search_wrapperr_no_auth(){
|
||||||
|
|
||||||
get_functions();
|
get_functions();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue