sanitysama

VocaDB Do Something 10.11

Oct 11th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        vocadb
  3. // @namespace   95.211.209.53-e85f8079-b847-455f-b080-8467e2977711@sanitysama
  4. // @description delimiters
  5. // @include     http://vocadb.net/*
  6. // @include     https://vocadb.net/*
  7. // @version     1
  8. // @grant       none
  9. // @run-at      document-end
  10. // ==/UserScript==
  11.  
  12. var path1 = "http://vocadb.net/Album/DownloadTags/";
  13. var pathArray = window.location.pathname.split( '/' )[2];
  14. var path2 = "?setFormatString=true&formatString=%25artist%25%C2%B6%25discnumber%25%C2%B6%25track%25%C2%B6%25title%25%C2%B6%25album%25%C2%B6%25releaseyear%25%C2%B6(%25releaseevent%25)%20%25producers%25%25featvocalists%25";
  15. var link = path1.concat(pathArray,path2);
  16.  
  17. // 1. Create the button
  18. var button = document.createElement("button");
  19. button.innerHTML = "Do Something";
  20.  
  21. // 2. Append somewhere
  22. //var body = document.getElementsByTagName("body")[0];
  23. var node = document.getElementById("topBar");
  24. node.appendChild(button);
  25.  
  26. // 3. Add event handler
  27. button.addEventListener ("click", function() {
  28.   document.location.href = link;
  29. });
Advertisement
Add Comment
Please, Sign In to add comment