SeriesEver Helper

This userscript assists all sites use plugins of SeriesEver in fetching data links. Mainly used as an alternative to the Java option currently provided.

  1. // ==UserScript==
  2. // @name SeriesEver Helper
  3. // @namespace http://SeriesEver.com/
  4. // @version 0.1
  5. // @description This userscript assists all sites use plugins of SeriesEver in fetching data links. Mainly used as an alternative to the Java option currently provided.
  6. // @icon http://seriesever.net/off/erweiterung/userscript/icon128.png
  7. // @icon64 http://seriesever.net/off/erweiterung/userscript/icon64.png
  8. // @homepage http://seriesever.net/off/erweiterung/
  9. // @author SeriesEver
  10. // @match https://*/*
  11. // @match http://*/*
  12. // @grant GM_xmlhttpRequest
  13. // @run-at document-start
  14. // ==/UserScript==
  15.  
  16. function checkReq(){
  17. var list = document.getElementById("SeriesEverExtListReq");
  18. if(list==null){
  19. return;
  20. }
  21. list.title = "ready";
  22. if(list.childNodes.length>0){
  23. var curReq = list.firstChild;
  24. if(typeof curReq.innerHTML=="undefined"){
  25. list.removeChild(curReq);
  26. return;
  27. }
  28. var obj = JSON.parse(atob(curReq.innerHTML));
  29. obj.onload = obj.onerror = obj.onabor = function(response){
  30. var txtout = document.createElement("textarea");
  31. txtout.id = obj.extreqid;
  32. txtout.style.display = "none";
  33. var Hfres = response.status+" "+response.statusText+"\r\n"+response.responseHeaders;
  34. if(response.finalUrl){
  35. Hfres += "FinalLocation: "+response.finalUrl+"\r\n";
  36. }
  37. if(obj.returndtaescape){
  38. txtout.value = escape(Hfres+"\r\n"+response.responseText);
  39. }else if(obj.returndtab64){
  40. txtout.value = btoa(Hfres+"\r\n"+response.responseText);
  41. }else{
  42. txtout.value = Hfres+"\r\n"+response.responseText;
  43. }
  44. document.body.appendChild(txtout);
  45. };
  46. GM_xmlhttpRequest(obj);
  47. list.removeChild(curReq);
  48. }
  49. }
  50. setInterval(checkReq,100);