Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. function urlconvert(){
  2. var oldurl=$("#oldurl").attr("value");
  3. oldurl=trimString(oldurl);
  4. if (oldurl=='')
  5. {
  6. alert('ÇëÊäÈëURLµØÖ·!');
  7. return false;
  8. }
  9. if (oldurl.indexOf("thunder://")!=-1)
  10. {
  11. newurl=Thunderdecode(oldurl);
  12. }else if(oldurl.indexOf("Flashget://")!=-1){
  13. newurl=Flashgetdecode(oldurl);
  14. }else if(oldurl.indexOf("qqdl://")!=-1){
  15. newurl=qqdecode(oldurl);
  16. }else{
  17. newurl=oldurl;
  18. }
  19. thunderurl=ThunderEncode(newurl);
  20. flashgeturl=flashetencode(newurl);
  21. qqurl=qqencode(newurl);
  22. $("#oldurl").attr("value",oldurl);
  23. $("#newurl").attr("value",newurl);
  24. $("#thunderurl").attr("value",thunderurl);
  25. $("#flashgeturl").attr("value",flashgeturl);
  26. $("#qqurl").attr("value",qqurl);
  27. //$("#down_newurl").html("&nbsp;&nbsp;&nbsp;<a target='_blank' href='"+newurl+"'>ÏÂÔØ</a>");
  28. $("#down_thunderurl").html("&nbsp;&nbsp;&nbsp;<a href='javascript://' thunderHref='"+thunderurl+"' thunderPid='09122' thunderType='' thunderResTitle='' onClick='return OnDownloadClick_Simple(this,2,4)' oncontextmenu='ThunderNetwork_SetHref(this)' >ѸÀ×ÏÂÔØ</a>");
  29. $("#down_flashgeturl").html("&nbsp;&nbsp;&nbsp;<a href='javascript://' onclick='ConvertURL2FG(\""+flashgeturl+"\",\""+newurl+"\",1926)'></a>");
  30.  
  31. }
  32.  
  33. function ConvertURL2FG(url,fUrl,uid)
  34. {
  35. try{
  36. FlashgetDown(url,uid);
  37. }catch(e){location.href = fUrl;}
  38. }
  39. function Flashget_SetHref(obj,uid){obj.href = obj.fg;}
  40. function trimString(str)
  41. {
  42. var re;
  43. var newstr;
  44. re = new RegExp("^(\\s)*");
  45. re2 = new RegExp("(\\s)*$");
  46. newstr = str.replace(re,"");
  47. newstr = newstr.replace(re2,"");
  48.  
  49. return newstr;
  50. }
  51. function qqencode(url){
  52. url='qqdl://'+encode64(url);
  53. return url;
  54. }
  55. function flashetencode(url){
  56. url='Flashget://'+encode64('[FLASHGET]'+url+'[FLASHGET]')+'&1926';
  57. return url;
  58. }
  59. function ThunderEncode(t_url) {
  60. var thunderPrefix = "AA";
  61. var thunderPosix = "ZZ";
  62. var thunderTitle = "thunder://";
  63. var tem_t_url = t_url;
  64. var thunderUrl = thunderTitle + encode64(thunderPrefix + tem_t_url + thunderPosix);
  65. return thunderUrl;
  66. }
  67.  
  68. function Thunderdecode(url) {
  69. url=url.replace('thunder://','');
  70. thunderUrl=decode64(url);
  71. thunderUrl=thunderUrl.substr(2,thunderUrl.length-4);
  72. return thunderUrl;
  73. }
  74.  
  75. function Flashgetdecode(url){
  76. url=url.replace('Flashget://','');
  77. if (url.indexOf('&')!=-1)
  78. {
  79. url=url.substr(0,url.indexOf('&'));
  80. }
  81. url=decode64(url);
  82. flashgeturl=url.replace('[FLASHGET]','');
  83. flashgeturl=flashgeturl.replace('[FLASHGET]','');
  84.  
  85. return flashgeturl;
  86. }
  87. function qqdecode(url){
  88. url=url.replace('qqdl://','');
  89. qqurl=decode64(url);
  90. return qqurl;
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement