nhentai to exhentai

grabs title from nhentai and searches for it on exhentai

  1. // ==UserScript==
  2. // @name nhentai to exhentai
  3. // @include /.*nhentai\.net\/g\//
  4. // @run-at document-end
  5. // @author Vyre
  6. // @description grabs title from nhentai and searches for it on exhentai
  7. // @grant none
  8. // @version 0.0.1.30181226024542
  9. // @namespace https://greasyfork.org/users/235081
  10. // ==/UserScript==
  11.  
  12. function Url() {
  13. var html = document.getElementById("info");
  14. var title = html.querySelector("h1");
  15. var title2 = title.innerHTML
  16. const regex = /<.*?>/gm;
  17. const subst = ``;
  18. const result = title2.replace(regex, subst);
  19. var Link = 'exhentai.org/?f_search='+result;
  20. window.location.href = '//'+Link;
  21. }
  22. Url();