mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-28 16:00:14 +02:00
refactor: introduce http Request object (#3926)
This commit is contained in:
parent
9574c17ddc
commit
d08d13f2c8
19 changed files with 125 additions and 94 deletions
|
@ -4,7 +4,7 @@ var abort = false;
|
|||
|
||||
window.onload = function() {
|
||||
|
||||
fetch(remote + '/index.php?action=list').then(function(response) {
|
||||
fetch(remote + '/?action=list').then(function(response) {
|
||||
return response.text()
|
||||
}).then(function(data){
|
||||
processBridgeList(data);
|
||||
|
@ -46,9 +46,9 @@ function buildTable(bridgeList) {
|
|||
var td_bridge = document.createElement('td');
|
||||
td_bridge.innerText = bridgeList.bridges[bridge].name;
|
||||
|
||||
// Link to the actual bridge on index.php
|
||||
// Link to the actual bridge on frontpage
|
||||
var a = document.createElement('a');
|
||||
a.href = remote + "/index.php?show_inactive=1#bridge-" + bridge;
|
||||
a.href = remote + "/?show_inactive=1#bridge-" + bridge;
|
||||
a.target = '_blank';
|
||||
a.innerText = '[Show]';
|
||||
a.style.marginLeft = '5px';
|
||||
|
@ -104,7 +104,7 @@ function checkNextBridgeAsync() {
|
|||
|
||||
msg.getElementsByTagName('span')[0].textContent = 'Processing ' + bridge + '...';
|
||||
|
||||
fetch(remote + '/index.php?action=Connectivity&bridge=' + bridge)
|
||||
fetch(remote + '/?action=Connectivity&bridge=' + bridge)
|
||||
.then(function(response) { return response.text() })
|
||||
.then(JSON.parse)
|
||||
.then(processBridgeResultAsync)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue