1
0
Fork 0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2024-12-19 01:20:58 +03:00
rss-bridge/static/select.js
logmanoriginal cd012e115b [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).
2017-08-11 19:39:16 +02:00

10 lines
No EOL
267 B
JavaScript

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);