Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
throwing order
Browse files Browse the repository at this point in the history
  • Loading branch information
Seedmanc committed Feb 27, 2016
1 parent 4ae0ee8 commit 0006df0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions booru.mass.uploader.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ if (~document.location.href.indexOf('s=mass_upload')) {
localStorage.setItem('auth_token', token);
}

if (document.querySelector('[src*="moe-legacy"]') || document.querySelector('html.action-post') || document.querySelector('[href*="/post/upload"]')) {
localStorage.setItem('current', 'moebooru');
} else if (document.querySelector('[href*="/uploads/new"]') || ~document.documentElement.innerHTML.indexOf('Running Danbooru')) {
localStorage.setItem('current', 'danbooru');
}

if (!navbar) {
throw "can't link the uploader";
}
Expand All @@ -71,10 +77,4 @@ if (~document.location.href.indexOf('s=mass_upload')) {
a.href = document.location.protocol + '//' + document.location.hostname + '/index.php?page=post&s=mass_upload';
li.appendChild(a);
navbar.appendChild(li);

if (document.querySelector('[src*="moe-legacy"]') || document.querySelector('html.action-post') || document.querySelector('[href*="/post/upload"]')) {
localStorage.setItem('current', 'moebooru');
} else if (document.querySelector('[href*="/uploads/new"]') || ~document.documentElement.innerHTML.indexOf('Running Danbooru')) {
localStorage.setItem('current', 'danbooru');
}
}
}

0 comments on commit 0006df0

Please sign in to comment.