mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-28 16:00:14 +02:00
[index] Show bridge options when loading with URL fragment
Loading the page with an URL fragement (#bridge-*) should result in the bridge showing all parameters by default. Unfortunately this is not possible using PHP, which is why a new JavaScript function is needed (select.js) That way, when returning from a bridge ('back to rss-bridge') will keep the selected bridge active (only works for HTML format).
This commit is contained in:
parent
df9e3968dc
commit
cd012e115b
2 changed files with 11 additions and 0 deletions
10
static/select.js
Normal file
10
static/select.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
function select(){
|
||||
var fragment = window.location.hash.substr(1);
|
||||
var bridge = document.getElementById(fragment);
|
||||
|
||||
if(bridge !== null) {
|
||||
bridge.getElementsByClassName('showmore-box')[0].checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', select);
|
Loading…
Add table
Add a link
Reference in a new issue