aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/default/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/default/js')
-rw-r--r--assets/default/js/base.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/assets/default/js/base.js b/assets/default/js/base.js
index d5c29c69..f61cfa92 100644
--- a/assets/default/js/base.js
+++ b/assets/default/js/base.js
@@ -27,7 +27,7 @@ function findParent(element, tagName, attributes) {
27 */ 27 */
28function refreshToken() { 28function refreshToken() {
29 const xhr = new XMLHttpRequest(); 29 const xhr = new XMLHttpRequest();
30 xhr.open('GET', '?do=token'); 30 xhr.open('GET', './?do=token');
31 xhr.onload = () => { 31 xhr.onload = () => {
32 const token = document.getElementById('token'); 32 const token = document.getElementById('token');
33 token.setAttribute('value', xhr.responseText); 33 token.setAttribute('value', xhr.responseText);
@@ -546,7 +546,7 @@ function init(description) {
546 const refreshedToken = document.getElementById('token').value; 546 const refreshedToken = document.getElementById('token').value;
547 const fromtag = block.getAttribute('data-tag'); 547 const fromtag = block.getAttribute('data-tag');
548 const xhr = new XMLHttpRequest(); 548 const xhr = new XMLHttpRequest();
549 xhr.open('POST', '?do=changetag'); 549 xhr.open('POST', './?do=changetag');
550 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 550 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
551 xhr.onload = () => { 551 xhr.onload = () => {
552 if (xhr.status !== 200) { 552 if (xhr.status !== 200) {
@@ -558,8 +558,8 @@ function init(description) {
558 input.setAttribute('value', totag); 558 input.setAttribute('value', totag);
559 findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none'; 559 findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none';
560 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag); 560 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag);
561 block.querySelector('a.tag-link').setAttribute('href', `?searchtags=${encodeURIComponent(totag)}`); 561 block.querySelector('a.tag-link').setAttribute('href', `./?searchtags=${encodeURIComponent(totag)}`);
562 block.querySelector('a.rename-tag').setAttribute('href', `?do=changetag&fromtag=${encodeURIComponent(totag)}`); 562 block.querySelector('a.rename-tag').setAttribute('href', `./?do=changetag&fromtag=${encodeURIComponent(totag)}`);
563 563
564 // Refresh awesomplete values 564 // Refresh awesomplete values
565 existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag)); 565 existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag));
@@ -593,7 +593,7 @@ function init(description) {
593 593
594 if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) { 594 if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) {
595 const xhr = new XMLHttpRequest(); 595 const xhr = new XMLHttpRequest();
596 xhr.open('POST', '?do=changetag'); 596 xhr.open('POST', './?do=changetag');
597 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 597 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
598 xhr.onload = () => { 598 xhr.onload = () => {
599 block.remove(); 599 block.remove();