Advertisement
Guest User

illimitux.js deobfuscated

a guest
Apr 20th, 2010
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.02 KB | None | 0 0
  1. var ilx_prefsCom = Components.classes['@mozilla.org/preferences-service;1'].getService(
  2. Components.interfaces.nsIPrefBranch);
  3. var ilx_prefsBranch = Components.classes['@mozilla.org/preferences-service;1'].getService(
  4. Components.interfaces.nsIPrefService).getBranch("extensions.illimitux.").QueryInterface(
  5. Components.interfaces.nsIPrefBranch2);
  6. var ilx_vers = "4.0";
  7. var ilx_uu = "http://www.illimitux.net/";
  8. var ilx_lastLabel = "";
  9. var ilx_lastAly = "no";
  10. var ilx_firstLoch = "";
  11. var ilx_linkDivx = "";
  12. var ilx_framesnotChanged = true;
  13. var ilx_welcomed = false;
  14. var ilx_Backup_Time = "";
  15. var ilx_Backup_Time_second = "";
  16. var ilx_fullname = new Array;
  17. ilx_fullname.mv = "MegaVideo";
  18. ilx_fullname.mp = "MegaPorn";
  19. ilx_fullname.zs = "zShare";
  20. ilx_fullname.df = "DepositFiles";
  21. ilx_fullname.mu = "MegaUpload";
  22. ilx_fullname.veoh = "Veoh";
  23. ilx_fullname.noveoh = "Veoh";
  24. ilx_fullname.rs = "Rapidshare";
  25. ilx_fullname['4s'] = "4shared";
  26. function ilx_rand(min, max){
  27. var argc = arguments.length;
  28. if (argc === 0){
  29. min = 1000;
  30. max = 50000;
  31. }
  32. else if (argc === 1){
  33. }
  34. return Math.floor(Math.random() * (max - min + 1)) + min;
  35. }
  36. function ilx_utf8_encode(argString){
  37. var string = (argString + "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
  38. var utftext = "";
  39. var start, end;
  40. var stringl = 0;
  41. start = end = 0;
  42. stringl = string.length;
  43. for (var n = 0; n < stringl; n ++ ){
  44. var c1 = string.charCodeAt(n);
  45. var enc = null;
  46. if (c1 < 128){
  47. end++;
  48. }
  49. else if (c1 > 127 && c1 < 2048){
  50. enc = String.fromCharCode(c1 >> 6 | 192) + String.fromCharCode(c1 & 63 | 128);
  51. }
  52. else {
  53. enc = String.fromCharCode(c1 >> 12 | 224) + String.fromCharCode(c1 >> 6 & 63 | 128) +
  54. String.fromCharCode(c1 & 63 | 128);
  55. }
  56. if (enc !== null){
  57. if (end > start){
  58. utftext += string.substring(start, end);
  59. }
  60. utftext += enc;
  61. start = end = n + 1;
  62. }
  63. }
  64. if (end > start){
  65. utftext += string.substring(start, string.length);
  66. }
  67. return utftext;
  68. }
  69. function ilx_convert(data){
  70. var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  71. var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = "", tmp_arr = [];
  72. if (!data){
  73. return data;
  74. }
  75. data = ilx_utf8_encode(data + "");
  76. do {
  77. o1 = data.charCodeAt(i ++ );
  78. o2 = data.charCodeAt(i ++ );
  79. o3 = data.charCodeAt(i ++ );
  80. bits = o1 << 16 | o2 << 8 | o3;
  81. h1 = bits >> 18 & 63;
  82. h2 = bits >> 12 & 63;
  83. h3 = bits >> 6 & 63;
  84. h4 = bits & 63;
  85. tmp_arr[ac ++ ] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
  86. }
  87. while (i < data.length);
  88. enc = tmp_arr.join("");
  89. switch(data.length % 3){
  90. case1 : enc = enc.slice(0 ,- 2) + "==";
  91. break ;
  92. case2 : enc = enc.slice(0 ,- 1) + "=";
  93. break ;
  94. default:;
  95. }
  96. enc = enc.replace(/=/g, "0Oox");
  97. enc = enc.replace(/\+/g, "1Iix");
  98. enc = enc.replace(/\//g, "Yyux");
  99. return enc;
  100. }
  101. function ilx_lcz(args, reps){
  102. tort = args.replace("%@", reps);
  103. return tort;
  104. }
  105. function ilx_openTab(args){
  106. if (ilx_prefsBranch.getBoolPref("ilx_pref_tab")){
  107. var win = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(
  108. Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser");
  109. win.openUILinkIn(args, "tab");
  110. }
  111. else {
  112. window.content.document.location.href = args;
  113. }
  114. }
  115. function ilx_clearHTML(obj){
  116. while (obj.firstChild){
  117. obj.removeChild(obj.firstChild);
  118. }
  119. }
  120. function ilx_addTxt(args, txt){
  121. args.appendChild(document.createTextNode(txt));
  122. }
  123. function ilx_clear_addTxt(args, txt){
  124. ilx_clearHTML(args);
  125. ilx_addTxt(args, txt);
  126. }
  127. function ilx_getdocuments(){
  128. var allDocuments = new Array;
  129. allDocuments.push(window.top.getBrowser().selectedBrowser.contentWindow.document);
  130. var allFrames = window.top.getBrowser().selectedBrowser.contentWindow.frames;
  131. for (var i = 0; i < allFrames.length; i ++ ){
  132. allDocuments.push(allFrames[i].document);
  133. }
  134. return allDocuments;
  135. }
  136. function ilx_unecape(str){
  137. str = str.split("<").join("1");
  138. str = str.split("{").join("2");
  139. str = str.split("]").join("3");
  140. str = str.split("[").join("4");
  141. str = str.split("}").join("5");
  142. str = str.split("|").join("6");
  143. str = str.split(">").join("7");
  144. cf = str.length;
  145. fin = "";
  146. while (cf >= 0){
  147. fin += str.charAt(cf);
  148. cf--;
  149. }
  150. t = fin;
  151. return unescape(t);
  152. }
  153. function ilx_removeChildrenFromNode(e){
  154. if (!e){
  155. return false;
  156. }
  157. if (typeof e == "string"){
  158. e = xGetElementById(e);
  159. }
  160. while (e.hasChildNodes()){
  161. e.removeChild(e.firstChild);
  162. }
  163. return true;
  164. }
  165. function ilx_opensite(args){
  166. window.opener.openURL(ilx_uu + args + ".php");
  167. }
  168. function ilx_geturls(){
  169. var url_list = new Array;
  170. var docs = ilx_getdocuments(window.content);
  171. var embeds = new Array;
  172. var parms = new Array;
  173. for (var j = 0; j < docs.length; j ++ ){
  174. var this_iframes = docs[j].getElementsByTagName("iframe");
  175. for (var c = 0; c < this_iframes.length; c ++ ){
  176. if (this_iframes[c].src != ""){
  177. this_iframes[c].addEventListener("load", ilx_updateIcon_frm, true);
  178. }
  179. }
  180. var this_embeds = docs[j].getElementsByTagName("embed");
  181. for (var c = 0; c < this_embeds.length; c ++ ){
  182. if (this_embeds[c].src != ""){
  183. url_list.push(this_embeds[c].src);
  184. }
  185. }
  186. var this_parms = docs[j].getElementsByTagName("param");
  187. for (var x = 0; x < this_parms.length; x ++ ){
  188. if (this_parms[x].getAttribute("name") == "movie"){
  189. if (this_parms[x].getAttribute("value") != ""){
  190. url_list.push(this_parms[x].getAttribute("value"));
  191. }
  192. }
  193. }
  194. }
  195. return url_list;
  196. }
  197. function ilx_getCnt(){
  198. var targetBrowser = window.top.getBrowser().selectedBrowser;
  199. if (targetBrowser && targetBrowser.currentURI.spec){
  200. var xmlserial = new XMLSerializer;
  201. var doc = new XPCNativeWrapper(targetBrowser.contentWindow, "document");
  202. var mainstr = xmlserial.serializeToString(doc.document);
  203. return mainstr;
  204. }
  205. }
  206. function ilx_analyseEmbed(){
  207. var uris = ilx_geturls();
  208. if (uris.length != 0){
  209. var y = 0;
  210. var Vid = new Array;
  211. for (x = 0; x < uris.length; x ++ ){
  212. if (uris[x].indexOf("megavideo", 0) != "-1"){
  213. ff = uris[x].split("v=");
  214. if (!ff[1]){
  215. ff = uris[x].split("/e/");
  216. }
  217. if (!ff[1]){
  218. ff = uris[x].split("/v/");
  219. }
  220. Vid[y] = new Array;
  221. Vid[y].kind = "megavideo";
  222. Vid[y].vid = ff[1].substring(0, 8);
  223. y++;
  224. }
  225. if (uris[x].indexOf("megaporn", 0) != "-1"){
  226. ff = uris[x].split("v=");
  227. if (!ff[1]){
  228. ff = uris[x].split("/e/");
  229. }
  230. if (!ff[1]){
  231. ff = uris[x].split("/v/");
  232. }
  233. Vid[y] = new Array;
  234. Vid[y].kind = "megaporn";
  235. Vid[y].vid = ff[1].substring(0, 8);
  236. y++;
  237. }
  238. if (uris[x].indexOf("permalinkId=", 0) != "-1" && uris[x].indexOf("veoh", 0) != "-1"
  239. ){
  240. ff = uris[x].split("permalinkId=");
  241. ff = ff[1].split("#").join("");
  242. ff2 = ff.split("&");
  243. Vid[y] = new Array;
  244. Vid[y].kind = "veoh";
  245. Vid[y].vid = ff2[0];
  246. y++;
  247. }
  248. }
  249. return Vid;
  250. }
  251. else {
  252. var walo = new Array;
  253. return walo;
  254. }
  255. }
  256. function ilx_removeLoading(){
  257. if (document.getElementById("chargement_ilx")){
  258. document.getElementById("ilx_mgttext").removeChild(document.getElementById(
  259. "chargement_ilx"));
  260. }
  261. }
  262. function ilx_setLoading(args){
  263. ilx_removeLoading();
  264. loadLabel = document.createElement("label");
  265. loadLabel.setAttribute("value", args);
  266. loadLabel.id = "chargement_ilx";
  267. document.getElementById("ilx_mgttext").appendChild(loadLabel);
  268. }
  269. function ilx_setMenuLabel(exec, execVid){
  270. var kinds = new Array("ilx_statumg", "ilx_ctxmg", "ilx_toolmg");
  271. for (c = 0; c < kinds.length; c ++ ){
  272. menuk = kinds[c];
  273. if (document.getElementById(menuk)){
  274. ilx_removeChildrenFromNode(document.getElementById(menuk));
  275. if (exec == "mu"){
  276. barmus = document.createElement("menuitem");
  277. barmus.setAttribute("label", ilx_lang.stream_label);
  278. barmus.addEventListener("click", ilx_get_mu_download, true);
  279. barmus.setAttribute("id", "stat_mus");
  280. document.getElementById(menuk).appendChild(barmus);
  281. barmudl = document.createElement("menuitem");
  282. barmudl.setAttribute("label", ilx_lang.download_label);
  283. barmudl.addEventListener("click", ilx_get_mu_download, true);
  284. barmudl.setAttribute("id", "stat_mudl");
  285. document.getElementById(menuk).appendChild(barmudl);
  286. }
  287. else if (exec == "rs" || exec == "mv" || exec == "mp" || exec == "veoh" || exec ==
  288. "noveoh" || exec == "df" || exec == "4s"){
  289. barp = document.createElement("menuitem");
  290. barp.setAttribute("label", ilx_lcz(ilx_lang.rmvLimit_label, ilx_fullname[exec]));
  291. barp.addEventListener("click", function (){
  292. ilx_sidebarClick(exec, execVid);
  293. }
  294. , true);
  295. barp.setAttribute("id", "stat_limit");
  296. document.getElementById(menuk).appendChild(barp);
  297. }
  298. else if (exec == "captcha"){
  299. barcapt = document.createElement("menuitem");
  300. barcapt.setAttribute("label", ilx_lang.captcha_label);
  301. document.getElementById(menuk).appendChild(barcapt);
  302. }
  303. else if (exec == "rs1"){
  304. barrs1 = document.createElement("menuitem");
  305. barrs1.setAttribute("label", "Select \"free\" option");
  306. barrs1.addEventListener("click", function (){
  307. window.content.document.getElementById("ff").submit();
  308. }
  309. , true);
  310. document.getElementById(menuk).appendChild(barrs1);
  311. }
  312. barpref = document.createElement("menuitem");
  313. barpref.setAttribute("label", "Preferences");
  314. barpref.setAttribute("oncommand", "ilx_openPref()");
  315. barpref.setAttribute("id", "stat_preferences");
  316. document.getElementById(menuk).appendChild(barpref);
  317. }
  318. }
  319. }
  320. function ilx_setTextBox(args){
  321. if (window.content.document.getElementById("alertTab_")){
  322. ilx_clear_addTxt(window.content.document.getElementById("alertTab_"), args);
  323. }
  324. }
  325. function ilx_sidebarClick(exec, execVid){
  326. if (exec == "mv"){
  327. ilx_get_mv(execVid);
  328. }
  329. else if (exec == "mp"){
  330. ilx_get_mp(execVid);
  331. }
  332. else if (exec == "captcha"){
  333. ilx_focuscaptcha();
  334. }
  335. else if (exec == "mu"){
  336. ilx_get_mu_stream();
  337. }
  338. else if (exec == "mud"){
  339. ilx_get_mu_download();
  340. }
  341. else if (exec == "veoh"){
  342. ilx_get_veoh(execVid);
  343. }
  344. else if (exec == "rs"){
  345. ilx_get_rs();
  346. }
  347. }
  348. function ilx_showAlert(kindArgs, vidArgs){
  349. exec = "";
  350. execVid = vidArgs;
  351. if (!window.content.document.getElementById("_ilx_alertShown_")){
  352. var walo = new Array;
  353. return walo;
  354. }
  355. if (window.content.document.getElementById("_ilx_alertShown_").value == kindArgs + "" +
  356. vidArgs){
  357. var walo = new Array;
  358. return walo;
  359. }
  360. loch = window.content.document.location.href.toLowerCase();
  361. window.content.document.getElementById("_ilx_alertShown_").value = kindArgs + "" +
  362. vidArgs;
  363. window.content.document.body.appendChild(prv);
  364. if (kindArgs == "megavideo"){
  365. exec = "mv";
  366. ilx_lastLabel = ilx_lcz(ilx_lang.rmvLimit_label, "MegaVideo");
  367. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  368. }
  369. else if (kindArgs == "megaporn"){
  370. exec = "mp";
  371. ilx_lastLabel = ilx_lcz(ilx_lang.rmvLimit_label, "MegaPorn");
  372. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  373. }
  374. else if (kindArgs == "veoh"){
  375. exec = "veoh";
  376. ilx_lastLabel = ilx_lcz(ilx_lang.rmvLimit_label, "Veoh");
  377. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  378. }
  379. else if (kindArgs == "captcha"){
  380. exec = "captcha";
  381. ilx_lastLabel = ilx_lang.captcha_label;
  382. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  383. }
  384. else if (kindArgs == "mu"){
  385. exec = "mu";
  386. ilx_lastLabel = ilx_lang.stream_label;
  387. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  388. }
  389. else if (kindArgs == "zs"){
  390. exec = "zs";
  391. ilx_lastLabel = ilx_lang.stream_label;
  392. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  393. }
  394. else if (kindArgs == "df"){
  395. exec = "df";
  396. ilx_lastLabel = ilx_lang.stream_label;
  397. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  398. }
  399. else if (kindArgs == "4s"){
  400. exec = "4s";
  401. ilx_lastLabel = ilx_lang.stream_label;
  402. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  403. }
  404. else if (kindArgs == "rs"){
  405. exec = "rs";
  406. ilx_lastLabel = ilx_lcz(ilx_lang.rmvLimit_label, "Rapidshare");
  407. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  408. }
  409. else if (kindArgs == "rs1"){
  410. exec = "rs1";
  411. document.getElementById("ilx_mgttext").setAttribute("status", "has_items");
  412. }
  413. else {
  414. exec = "";
  415. }
  416. if (exec != ""){
  417. if (ilx_prefsBranch.getBoolPref("ilx_pref_pt_" + exec) == true){
  418. ilx_setMenuLabel(exec, execVid);
  419. if (ilx_prefsBranch.getBoolPref("ilx_pref_auto")){
  420. ilx_sidebarClick(exec, execVid);
  421. }
  422. else {
  423. if (ilx_prefsBranch.getBoolPref("ilx_pref_box")){
  424. if (exec != "captcha" && exec != "rs1"){
  425. ilx_makeAlert(exec, execVid);
  426. }
  427. }
  428. }
  429. if (exec == "captcha"){
  430. ilx_showcapt();
  431. }
  432. }
  433. }
  434. }
  435. function ilx_makeAlert(exec, execVid){
  436. bd = window.content.document.body;
  437. var embeds = window.content.document.getElementsByTagName("embed");
  438. for (e = 0; e < embeds.length; e ++ ){
  439. embeds[e].setAttribute("wmode", "opaque");
  440. embeds[e].src = embeds[e].src;
  441. }
  442. ilx_removeAlert();
  443. alrBox = document.createElement("div");
  444. alrBox.setAttribute("id", "alrBox");
  445. alrBox.setAttribute("style", "
  446. z-index:99995;position:fixed;right:10px;color:#FFF;font-size:11px;font-family:Arial;bottom
  447. :0px;width:295px;height:110px;background:transparent url('chrome://illimitux/skin/ff_box.p
  448. ng') no-repeat 0px 0px;");
  449. bd.appendChild(alrBox);
  450. lbox = window.content.document.getElementById("alrBox");
  451. alr = document.createElement("div");
  452. alr.setAttribute("id", "alertTab_");
  453. alr.setAttribute("style", "margin-left:67px; margin-top:32px; margin-right:5px;");
  454. alr.appendChild(document.createTextNode(ilx_lcz(ilx_lang.detects_lb, ilx_fullname[exec
  455. ])));
  456. alrcls = document.createElement("div");
  457. alrcls.setAttribute("id", "alertclose_");
  458. alrcls.addEventListener("click", ilx_removeAlert, true);
  459. alrcls.setAttribute("style", "
  460. z-index:99999;position:fixed;right:15px;bottom:87px;width:23px;height:23px;cursor:pointer;
  461. background:transparent url('chrome://illimitux/skin/ff_close.png') no-repeat;");
  462. if (exec == "mu" || exec == "zs" || exec == "df" || exec == "4s"){
  463. alrbtn = document.createElement("div");
  464. alrbtn.setAttribute("id", "alertbtn_");
  465. alrbtn.setAttribute("style", "
  466. z-index:99999;text-align:center;position:fixed;right:15px;bottom:37px;width:127px;height:1
  467. 7px;line-height:17px;cursor:pointer;color:#FFF;font-size:11px;font-family:Arial;background
  468. :transparent url('chrome://illimitux/skin/ff_btnmu.png') no-repeat;");
  469. alrlink1 = document.createElement("div");
  470. alrlink1.addEventListener("click", eval("ilx_get_" + exec + "_download"), true);
  471. alrlink1.appendChild(document.createTextNode(ilx_lang.dwld_lb));
  472. alrbtn.appendChild(alrlink1);
  473. alrlink2 = document.createElement("div");
  474. alrlink2.addEventListener("click", eval("ilx_get_" + exec + "_stream"), true);
  475. alrlink2.appendChild(document.createTextNode(" " + ilx_lang.stream_lb));
  476. alrbtn.appendChild(document.createTextNode(" | "));
  477. alrbtn.appendChild(alrlink2);
  478. }
  479. else {
  480. alrbtn = document.createElement("div");
  481. alrbtn.setAttribute("id", "alertbtn_");
  482. alrbtn.addEventListener("click", function (){
  483. ilx_sidebarClick(exec, execVid);
  484. }
  485. , true);
  486. alrbtn.setAttribute("style", "
  487. z-index:99999;text-align:center;position:fixed;right:15px;bottom:37px;width:127px;height:1
  488. 7px;line-height:17px;cursor:pointer;color:#FFF;font-size:11px;font-family:Arial;background
  489. :transparent url('chrome://illimitux/skin/ff_btn.png') no-repeat;");
  490. alrbtn.appendChild(document.createTextNode(ilx_lcz(ilx_lang.rmvLimit_label, "") + " "
  491. ));
  492. }
  493. alrpref = document.createElement("div");
  494. alrpref.setAttribute("id", "alertpref_");
  495. alrpref.addEventListener("click", ilx_openPref, true);
  496. alrpref.setAttribute("style", "
  497. z-index:99999;text-align:center;position:fixed;right:40px;bottom:92px;width:65px;height:14
  498. px;line-height:14px;cursor:pointer;color:#789CD8;font-size:10px;font-family:Arial;");
  499. alrpref.appendChild(document.createTextNode("Preferences"));
  500. alrauto = document.createElement("div");
  501. alrauto.setAttribute("id", "alertauto_");
  502. alrauto.setAttribute("style", "
  503. z-index:99999;text-align:center;position:fixed;right:163px;bottom:10px;width:135px;height:
  504. 20px;line-height:14px;cursor:pointer;color:#C0C0C0;font-size:10px;font-family:Arial;");
  505. alrauto.addEventListener("click", function (){
  506. ilx_prefsBranch.setBoolPref("ilx_pref_auto", true);
  507. ilx_sidebarClick(exec, execVid);
  508. }
  509. , true);
  510. alrauto.appendChild(document.createTextNode(ilx_lang.debriderAuto_box));
  511. alrdisable = document.createElement("div");
  512. alrdisable.setAttribute("id", "alertarmv_");
  513. alrdisable.setAttribute("style", "
  514. z-index:99999;text-align:center;position:fixed;right:20px;bottom:10px;width:135px;height:2
  515. 0px;line-height:14px;cursor:pointer;color:#C0C0C0;font-size:10px;font-family:Arial;");
  516. alrdisable.addEventListener("click", function (){
  517. ilx_prefsBranch.setBoolPref("ilx_pref_box", false);
  518. ilx_removeAlert();
  519. }
  520. , true);
  521. alrdisable.appendChild(document.createTextNode(ilx_lang.dont_box));
  522. lbox.appendChild(alrbtn);
  523. lbox.appendChild(alrdisable);
  524. lbox.appendChild(alrauto);
  525. lbox.appendChild(alrcls);
  526. lbox.appendChild(alr);
  527. lbox.appendChild(alrpref);
  528. }
  529. function ilx_removeAlert(){
  530. if (window.content.document.getElementById("alrBox")){
  531. window.content.document.body.removeChild(window.content.document.getElementById(
  532. "alrBox"));
  533. }
  534. }
  535. function ilx_openPref(){
  536. prefWin = window.openDialog("chrome://illimitux/content/preferences.xul",
  537. "Illimitux Preferences", "chrome,titlebar,toolbar,centerscreen,resizable");
  538. prefWin.focus();
  539. }
  540. function ilx_backuproxy(){
  541. ilx_bkproxy(false);
  542. alert(ilx_lang.proxy_restored);
  543. document.getElementById("current_proxy").value = ilx_prefsCom.getCharPref(
  544. "network.proxy.http") + ":" + ilx_prefsCom.getIntPref("network.proxy.http_port");
  545. }
  546. function ilx_changelang(args){
  547. alert(ilx_lang.update_lang);
  548. ilx_prefsBranch.setCharPref("locale", args);
  549. }
  550. function ilx_pref_load(){
  551. document.getElementById("ilx_pref_mkdon").label = ilx_lang.mkdon_lb;
  552. document.getElementById("ilx_pref_aide").label = ilx_lang.help_lb;
  553. document.getElementById("lang_label_activate").value = ilx_lang.lang_label_activate;
  554. document.getElementById("lang_label_general").value = ilx_lang.lang_label_general;
  555. document.getElementById("lang_label_langue").value = ilx_lang.lang_label_langue;
  556. document.getElementById("desc_recommended").value = ilx_lang.desc_recommended;
  557. document.getElementById("lang_button_backup").label = ilx_lang.lang_button_backup;
  558. document.getElementById("tab_label_general").label = ilx_lang.lang_label_general;
  559. document.getElementById("tab_label_about").label = ilx_lang.lang_label_about;
  560. document.getElementById("tab_label_plateforms").label = ilx_lang.lang_label_plateforms;
  561. document.getElementById("current_proxy").value = ilx_prefsCom.getCharPref(
  562. "network.proxy.http") + ":" + ilx_prefsCom.getIntPref("network.proxy.http_port");
  563. locale = ilx_prefsBranch.getCharPref("locale");
  564. elemL = document.getElementById("ilx_langPop").value = locale;
  565. var prefe = new Array("auto", "box", "embed", "tab", "referer", "zapmu", "rs", "proxy",
  566. "divx", "captcha", "pt_mv", "pt_mu", "pt_mp", "pt_rs", "pt_veoh", "pt_4s", "pt_zs");
  567. for (p = 0; p < prefe.length; p ++ ){
  568. if (document.getElementById("ilx_pref_" + prefe[p])){
  569. document.getElementById("ilx_pref_" + prefe[p]).checked = ilx_prefsBranch.
  570. getBoolPref("ilx_pref_" + prefe[p]);
  571. if (ilx_lang["pref_" + prefe[p] + "_lb"]){
  572. document.getElementById("ilx_pref_" + prefe[p]).label = ilx_lang["pref_" + prefe[
  573. p] + "_lb"];
  574. }
  575. }
  576. }
  577. }
  578. function ilx_tooglepref(args){
  579. ilx_prefsBranch.setBoolPref("ilx_pref_" + args, document.getElementById("ilx_pref_" +
  580. args).checked);
  581. }
  582. function ilx_welcome(){
  583. var win = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(
  584. Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser");
  585. win.openUILinkIn(ilx_uu + "welcome/" + ilx_lang.lang + "/" + ilx_vers + "/", "tab");
  586. ilx_prefsBranch.setBoolPref("ilx_firsttime_" + ilx_vers + "_", false);
  587. }
  588. function ilx_updateIcon_frm(){
  589. ilx_framesnotChanged = false;
  590. ilx_updateIcon();
  591. }
  592. function ilx_hitch(obj, meth){
  593. if (!obj[meth]){
  594. throw "method '" + meth + "' does not exist on object '" + obj + "'";
  595. }
  596. var staticArgs = Array.prototype.splice.call(arguments, 2, arguments.length);
  597. return function (){
  598. var args = Array.prototype.slice.call(staticArgs);
  599. Array.prototype.push.apply(args, arguments);
  600. return obj[meth].apply(obj, args);
  601. }
  602. ;
  603. }
  604. function ilx_injectScript(scripts, url, unsafeContentWin){
  605. var sandbox, xmlhttpRequester;
  606. var safeWin = new XPCNativeWrapper(unsafeContentWin);
  607. var safeDoc = safeWin.document;
  608. xmlhttpRequester = new ilx_xmlhttpRequester(unsafeContentWin, window);
  609. sandbox = new Components.utils.Sandbox(safeWin);
  610. sandbox.window = safeWin;
  611. sandbox.document = sandbox.window.document;
  612. sandbox.unsafeWindow = unsafeContentWin;
  613. sandbox.__proto__ = sandbox.window;
  614. sandbox.GM_xmlhttpRequest = ilx_hitch(xmlhttpRequester, "contentStartRequest");
  615. var scriptSrc = ilx_getUrlContents(scripts);
  616. Components.utils.evalInSandbox("(function(){" + scriptSrc + "})()", sandbox);
  617. }
  618. function ilx_bkproxy(ret){
  619. if (ilx_prefsBranch.getCharPref("illimitux_last_http").indexOf("illimitux") != "-1"){
  620. typeBK = "backup";
  621. }
  622. else {
  623. typeBK = "last";
  624. }
  625. ilx_prefsCom.setCharPref("network.proxy.http", ilx_prefsBranch.getCharPref("illimitux_" +
  626. typeBK + "_http"));
  627. ilx_prefsCom.setIntPref("network.proxy.http_port", ilx_prefsBranch.getIntPref(
  628. "illimitux_" + typeBK + "_port"));
  629. ilx_prefsCom.setIntPref("network.proxy.type", ilx_prefsBranch.getIntPref("illimitux_" +
  630. typeBK + "_type"));
  631. window.clearTimeout(ilx_Backup_Time_second);
  632. window.clearTimeout(ilx_Backup_Time);
  633. if (ret){
  634. reds = window.content.document.location.href.split("proxy/?r=");
  635. if (reds[1]){
  636. red = reds[1].split("&");
  637. window.content.document.location.href = unescape(red[0]);
  638. }
  639. else {
  640. window.content.history.go( - 1);
  641. }
  642. }
  643. }
  644. function ilx_divx(a, b){
  645. urlp = ilx_uu + "video/" + ilx_vers + "/divx/divx/?k=" + ilx_convert(ilx_linkDivx);
  646. ilx_openTab(urlp);
  647. }
  648. function ilx_detectDivx(){
  649. ilx_linkDivx = "";
  650. document.getElementById("illimitux-divxctx").label = ilx_lang.view_divx;
  651. document.getElementById("illimitux-divxctx").hidden = true;
  652. if (gContextMenu.onLink || gContextMenu.isTextSelected){
  653. if (gContextMenu.isTextSelected){
  654. var r = content.getSelection().getRangeAt(0);
  655. if (r){
  656. var div = r.startContainer.ownerDocument.createElement("div");
  657. div.appendChild(r.cloneContents());
  658. ilx_linkDivx = div.innerHTML;
  659. }
  660. else {
  661. ilx_linkDivx = selection.toString();
  662. }
  663. }
  664. else {
  665. ilx_linkDivx = gContextMenu.getLinkURL();
  666. }
  667. if (ilx_linkDivx.match(/^http/) && ilx_linkDivx.match(
  668. /(megaupload|avi|file|dl|mkv|divx|download|get|play|load)/g)){
  669. document.getElementById("illimitux-divxctx").hidden = false;
  670. }
  671. }
  672. else {
  673. document.getElementById("illimitux-divxctx").hidden = true;
  674. }
  675. }
  676. function ilx_updateIcon(){
  677. if (!window.content){
  678. return false;
  679. }
  680. if (window.content.document.getElementById("_ilx_updateIcon_") && ilx_framesnotChanged ==
  681. true ){
  682. return false;
  683. }
  684. else {
  685. ilx_framesnotChanged = true;
  686. loch = window.content.document.location.href.toLowerCase();
  687. prv = window.content.document.createElement("div");
  688. prv.id = "_ilx_updateIcon_";
  689. if (window.content.document.body){
  690. window.content.document.body.appendChild(prv);
  691. }
  692. if (!window.content.document.getElementById("_ilx_alertShown_")){
  693. pdrv = window.content.document.createElement("input");
  694. pdrv.id = "_ilx_alertShown_";
  695. pdrv.type = "hidden";
  696. if (window.content.document.body){
  697. window.content.document.body.appendChild(pdrv);
  698. }
  699. }
  700. if (ilx_welcomed == false && ilx_prefsBranch.prefHasUserValue("ilx_firsttime_" +
  701. ilx_vers + "_") == false){
  702. setTimeout(ilx_welcome, 1000);
  703. ilx_welcomed = true;
  704. }
  705. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_rs") == false){
  706. ilx_prefsBranch.setBoolPref("ilx_pref_rs", true);
  707. }
  708. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_box") == false){
  709. ilx_prefsBranch.setBoolPref("ilx_pref_box", true);
  710. }
  711. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_auto") == false){
  712. ilx_prefsBranch.setBoolPref("ilx_pref_auto", false);
  713. }
  714. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_divx") == false){
  715. ilx_prefsBranch.setBoolPref("ilx_pref_divx", true);
  716. }
  717. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_referer") == false){
  718. ilx_prefsBranch.setBoolPref("ilx_pref_referer", true);
  719. }
  720. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_proxy") == false){
  721. ilx_prefsBranch.setBoolPref("ilx_pref_proxy", true);
  722. }
  723. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_zapmu") == false){
  724. ilx_prefsBranch.setBoolPref("ilx_pref_zapmu", true);
  725. }
  726. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_captcha") == false){
  727. ilx_prefsBranch.setBoolPref("ilx_pref_captcha", true);
  728. }
  729. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_embed") == false){
  730. ilx_prefsBranch.setBoolPref("ilx_pref_embed", true);
  731. }
  732. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_tab") == false){
  733. ilx_prefsBranch.setBoolPref("ilx_pref_tab", true);
  734. }
  735. if (ilx_prefsBranch.prefHasUserValue("ilx_mu_auto") == false){
  736. ilx_prefsBranch.setCharPref("ilx_mu_auto", "");
  737. }
  738. var pt_pref = new Array("pt_mv", "pt_mu", "pt_mp", "pt_rs", "pt_veoh", "pt_4s",
  739. "pt_zs", "pt_rs1", "pt_captcha");
  740. for (pv = 0; pv < pt_pref.length; pv ++ ){
  741. if (ilx_prefsBranch.prefHasUserValue("ilx_pref_" + pt_pref[pv]) == false){
  742. ilx_prefsBranch.setBoolPref("ilx_pref_" + pt_pref[pv], true);
  743. }
  744. }
  745. ilx_setMenuLabel("", "");
  746. if (ilx_prefsBranch.prefHasUserValue("illimitux_backup_http") == false){
  747. ilx_prefsBranch.setCharPref("illimitux_backup_http", ilx_prefsCom.getCharPref(
  748. "network.proxy.http"));
  749. ilx_prefsBranch.setIntPref("illimitux_backup_port", ilx_prefsCom.getIntPref(
  750. "network.proxy.http_port"));
  751. ilx_prefsBranch.setIntPref("illimitux_backup_type", ilx_prefsCom.getIntPref(
  752. "network.proxy.type"));
  753. }
  754. if (ilx_prefsBranch.prefHasUserValue("illimitux_backup_referer") == false){
  755. ilx_prefsBranch.setIntPref("illimitux_backup_referer", ilx_prefsCom.getIntPref(
  756. "network.http.sendRefererHeader"));
  757. }
  758. if (loch.indexOf("illimitux.net/proxy/", 0) != "-1" && ilx_prefsCom.getCharPref(
  759. "network.proxy.http").indexOf("illimitux") != "-1"){
  760. ilx_bkproxy(true);
  761. }
  762. if (ilx_prefsBranch.getBoolPref("ilx_pref_referer") == true){
  763. ilx_prefsCom.setIntPref("network.http.sendRefererHeader", 0);
  764. }
  765. else {
  766. ilx_prefsCom.setIntPref("network.http.sendRefererHeader", ilx_prefsBranch.getIntPref
  767. ("illimitux_backup_referer"));
  768. }
  769. if (loch.indexOf("illimitux.net/video/", 0) != "-1" && window.content.document.
  770. getElementById("illimitux_streaming")){
  771. if (ilx_prefsBranch.getBoolPref("ilx_pref_proxy") == true){
  772. if (window.content.document.getElementById("illimitux_streaming").contentWindow.
  773. document.getElementById("server")){
  774. window.content.document.getElementById("illimitux_streaming").addEventListener(
  775. "load", ilx_updateIcon_frm, true);
  776. if (ilx_prefsCom.getCharPref("network.proxy.http").indexOf("illimitux") != "-1"
  777. ){
  778. ilx_bkproxy(false);
  779. }
  780. frmWind = window.content.document.getElementById("illimitux_streaming").
  781. contentWindow;
  782. var xhrP = new XMLHttpRequest;
  783. xhrP.open("GET", ilx_uu + "getproxy/" + ilx_convert(ilx_vers + "||mv||" +
  784. ilx_rand(0, 100000)) + "/", true);
  785. xhrP.setRequestHeader("Connection", "close");
  786. xhrP.onreadystatechange = function (){
  787. if (xhrP.readyState == 4){
  788. srvgetF = xhrP.responseText;
  789. Proxy = srvgetF.split("||");
  790. if (Proxy[1] != ""){
  791. if (Proxy[0] == 0){
  792. alert(ilx_lang.down_server);
  793. }
  794. else {
  795. if (Proxy[1] != ilx_prefsCom.getCharPref("network.proxy.http")){
  796. ilx_lastProx_http = ilx_prefsCom.getCharPref("network.proxy.http");
  797. ilx_lastProx_port = ilx_prefsCom.getIntPref("network.proxy.http_port"
  798. );
  799. ilx_lastProx_type = ilx_prefsCom.getIntPref("network.proxy.type");
  800. ilx_prefsBranch.setCharPref("illimitux_last_http", ilx_lastProx_http);
  801. ilx_prefsBranch.setIntPref("illimitux_last_port", ilx_lastProx_port);
  802. ilx_prefsBranch.setIntPref("illimitux_last_type", ilx_lastProx_type);
  803. ilx_prefsCom.setCharPref("network.proxy.http", Proxy[1]);
  804. ilx_prefsCom.setIntPref("network.proxy.http_port", Proxy[3]);
  805. ilx_prefsCom.setIntPref("network.proxy.type", Proxy[4]);
  806. ilx_Backup_Time_second = window.setTimeout(function (){
  807. ilx_bkproxy(false);
  808. }
  809. , 15000);
  810. frmWind.document.getElementById("server").value = Proxy[0];
  811. frmWind.document.getElementById("lastp").value = ilx_lastProx_http +
  812. ":" + ilx_lastProx_port;
  813. frmWind.document.getElementById("illimitux_gostream").submit();
  814. }
  815. }
  816. }
  817. }
  818. }
  819. ;
  820. xhrP.send(null);
  821. }
  822. }
  823. else {
  824. alert("Proxy switcher is disabled on preferences. Please activate it... ");
  825. }
  826. }
  827. if (loch.indexOf("illimitux.net/video/", 0) != "-1" && window.content.document.
  828. getElementById("illimitux_streaming") && ilx_prefsBranch.getBoolPref("ilx_pref_proxy")
  829. == true){
  830. if (window.content.document.getElementById("illimitux_streaming").contentWindow.
  831. document.getElementById("illimitux_loaded")){
  832. frmWind = window.content.document.getElementById("illimitux_streaming").
  833. contentWindow;
  834. ilx_Backup_Time = window.setTimeout(function (){
  835. ilx_bkproxy(false);
  836. }
  837. , 10000);
  838. }
  839. }
  840. if (loch.indexOf("megavideo.com", 0) != "-1" && (loch.indexOf("v=", 0) != "-1" || loch
  841. .indexOf("d=", 0) != "-1")){
  842. pageCtn = ilx_getCnt();
  843. vb = pageCtn.split(".v = \"");
  844. if (vb[1]){
  845. vb2 = vb[1].split("\"");
  846. v = vb2[0];
  847. }
  848. else {
  849. v = "";
  850. }
  851. lc = window.content.document.location.href.split("v=");
  852. if (!lc[1]){
  853. lc[1] = v;
  854. }
  855. if (lc[1]){
  856. vidmv = lc[1].substring(0, 8);
  857. ilx_showAlert("megavideo", vidmv);
  858. }
  859. }
  860. else if (loch.indexOf("megaporn.com", 0) != "-1" && (loch.indexOf("v=", 0) != "-1" ||
  861. loch.indexOf("d=", 0) != "-1")){
  862. pageCtn = ilx_getCnt();
  863. vb = pageCtn.split(".v = \"");
  864. if (vb[1]){
  865. vb2 = vb[1].split("\"");
  866. v = vb2[0];
  867. }
  868. else {
  869. v = "";
  870. }
  871. lc = window.content.document.location.href.split("v=");
  872. if (!lc[1]){
  873. lc[1] = v;
  874. }
  875. if (lc[1]){
  876. vidmv = lc[1].substring(0, 8);
  877. ilx_showAlert("megaporn", vidmv);
  878. }
  879. }
  880. else if (ilx_prefsBranch.getBoolPref("ilx_pref_zapmu") == true && window.content.
  881. document.getElementById("captchaform") && loch.indexOf("megaupload.com", 0) != "-1"){
  882. if (ilx_prefsBranch.getBoolPref("ilx_pref_pt_mu") == true){
  883. ilx_attachMU();
  884. }
  885. }
  886. else if (window.content.document.getElementById("captchaform") && loch.indexOf(
  887. "megaupload.com", 0) != "-1"){
  888. ilx_showAlert("captcha", false);
  889. }
  890. else if (window.content.document.getElementById("downloadlink") && loch.indexOf(
  891. "megaupload.com", 0) != "-1"){
  892. workMu();
  893. }
  894. else if (window.content.document.getElementById("download") && loch.indexOf(
  895. "zshare.net", 0) != "-1"){
  896. if (window.content.document.forms[0]){
  897. window.content.document.forms[0].submit();
  898. }
  899. else {
  900. ilx_showAlert("zs", false);
  901. }
  902. }
  903. else if ((window.content.document.getElementById("divDLStart") || window.content.
  904. document.getElementById("fileNameText")) && loch.indexOf("4shared.com", 0) != "-1"){
  905. if (window.content.document.location.href.indexOf("file/", 0) != "-1"){
  906. window.content.document.location.href = window.content.document.location.href.
  907. split("file").join("get");
  908. }
  909. else {
  910. ilx_showAlert("4s", false);
  911. }
  912. }
  913. else if (window.content.document.getElementById("box_big") && loch.indexOf(
  914. "depositfiles.com", 0) != "-1"){
  915. if (window.content.document.forms[1].action.indexOf("files/", 0) != "-1"){
  916. window.content.document.forms[1].submit();
  917. }
  918. else {
  919. ilx_showAlert("df", false);
  920. }
  921. }
  922. else if (loch.indexOf("veoh.com", 0) != "-1"){
  923. pageCtn = ilx_getCnt();
  924. lhref = window.content.document.location.href;
  925. if (lhref.indexOf("illimitux.net", 0) != "-1"){
  926. lhref = unescape(lhref);
  927. }
  928. dvs = lhref.split("watch%3D");
  929. if (!dvs[1]){
  930. dvs = lhref.split("watch/");
  931. }
  932. if (!dvs[1]){
  933. dvs = lhref.split("videos/");
  934. }
  935. if (dvs[1]){
  936. tempE = dvs[1].split("#");
  937. temp = tempE[0];
  938. tempsd = temp.split("&");
  939. tempd = tempsd[0];
  940. ilx_showAlert("veoh", tempd);
  941. }
  942. }
  943. else if (loch.indexOf("rapidshare.com/files", 0) != "-1" && window.content.document.
  944. getElementById("dl")){
  945. if (ilx_prefsBranch.getBoolPref("ilx_pref_pt_rs") == true){
  946. if (ilx_prefsBranch.getBoolPref("ilx_pref_rs")){
  947. ilx_get_rs();
  948. }
  949. else {
  950. ilx_showAlert("rs", false);
  951. }
  952. }
  953. }
  954. else if (loch.indexOf("rapidshare.com/files", 0) != "-1" && window.content.document.
  955. getElementById("ff")){
  956. if (ilx_prefsBranch.getBoolPref("ilx_pref_pt_rs") == true){
  957. if (ilx_prefsBranch.getBoolPref("ilx_pref_rs")){
  958. window.content.document.getElementById("ff").submit();
  959. }
  960. else {
  961. ilx_showAlert("rs1", false);
  962. }
  963. }
  964. }
  965. else {
  966. if (ilx_prefsBranch.getBoolPref("ilx_pref_embed")){
  967. if (loch.indexOf("illimitux.net", 0) == "-1"){
  968. var aly = ilx_analyseEmbed();
  969. if (aly.length > 0){
  970. delm = loch.split("/");
  971. ilx_firstLoch = delm[2].replace("www.", "");
  972. ilx_showAlert(aly[0].kind, aly[0].vid);
  973. }
  974. else {
  975. document.getElementById("ilx_mgttext").setAttribute("status", "no_items");
  976. ilx_showAlert(false, false);
  977. }
  978. }
  979. else {
  980. document.getElementById("ilx_mgttext").setAttribute("status", "no_items");
  981. ilx_showAlert(false, false);
  982. }
  983. }
  984. else {
  985. document.getElementById("ilx_mgttext").setAttribute("status", "no_items");
  986. ilx_showAlert(false, false);
  987. }
  988. }
  989. }
  990. }
  991. window.addEventListener("load", function (){
  992. if (document.getElementById("contentAreaContextMenu")){
  993. document.getElementById("contentAreaContextMenu").addEventListener("popupshowing",
  994. ilx_detectDivx, false);
  995. }
  996. }
  997. , false);
  998. window.addEventListener("DOMContentLoaded", function (){
  999. if (typeof gBrowser != "undefined"){
  1000. if (typeof gBrowser.tabContainer != "undefined"){
  1001. gBrowser.tabContainer.addEventListener("load", ilx_updateIcon, true);
  1002. gBrowser.tabContainer.addEventListener("TabSelect", ilx_updateIcon, true);
  1003. }
  1004. }
  1005. else {
  1006. window.addEventListener("load", ilx_updateIcon, true);
  1007. }
  1008. }
  1009. , true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement