$.register({
  rule: {
    host: /^openload\.co$/,
    path: /^\/f\/.*/,
  },
  start: function (m) {
    $.window.adblock = false;
    $.window.adblock2 = false; 
    $.window.popAdsLoaded = true; 
  },
  ready: function () {
    'use strict'; 

    var timer = $('#downloadTimer');  
    timer.style.display = 'none';     

    var dlCtn = $('#realdl'); 
    dlCtn.style.display = 'inline-block';

    var dlBtn = $('a', dlCtn);
    dlBtn.href = $.window.realdllink;

    var videoCtn = $.$('.videocontainer');

    if (videoCtn) {  
      var overlay = $('#videooverlay', videoCtn);
      overlay.click();

      // use iframe instead of $.openLink
      // in order to not affect streaming
      dlBtn.addEventListener('click', function (evt) {
        evt.preventDefault();

        var iframe = document.createElement('iframe');
        iframe.src = dlBtn.href;
        document.body.appendChild(iframe);
      });

      _.info(_.T('{0} -> {1}')(window.location, dlBtn.href));

      dlBtn.click();
    } else {  
      $.openLink(dlBtn.href);
    }
  }
});

// ex: ts=2 sts=2 sw=2 et
// sublime: tab_size 2; translate_tabs_to_spaces true; detect_indentation false; use_tab_stops true;
// kate: space-indent on; indent-width 2;

@@ -155,17 +155,16 @@
 = false;
- 
 %0A    $.w
@@ -189,17 +189,16 @@
  = true;
- 
 %0A  %7D,%0A  
@@ -235,17 +235,16 @@
 strict';
- 
 %0A%0A    va
@@ -273,18 +273,16 @@
 Timer');
-  
 %0A    tim
@@ -307,21 +307,16 @@
  'none';
-     
 %0A%0A    va
@@ -338,17 +338,16 @@
 ealdl');
- 
 %0A    dlC
@@ -515,18 +515,16 @@
 eoCtn) %7B
-  
 %0A      v
@@ -756,24 +756,111 @@
 Default();%0A%0A
+        // TODO *iframe* hack is not normal%0A        // please generalize in the future%0A
         var 
@@ -1085,18 +1085,16 @@
 %7D else %7B
-  
 %0A      $

add comment