primewire

primewire remove sponsored links|click unique search result|click preferred links

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        primewire
// @namespace   manobastardo
// @include     http://www.primewire.ag/*
// @version     1
// @grant       none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @description primewire remove sponsored links|click unique search result|click preferred links
// ==/UserScript==

// version block
var block = ['sponsor host', "promo host"];

$("table.movie_version").each(function(){
  var sample = $(this).find(".version_host").text().toLowerCase();
  var length = block.length;
  while(length--) {
     if (sample.indexOf(block[length])!=-1) {
       $(this).css("display", "none");
     }
  };  
});

// search result
var items = $(".index_item.index_item_ie");

if (items.length == 1) {
    window.location.assign(items.find("a").attr("href"));
}

// version preferred
var sites = [
    "filenuke",
    "sharesix",
    "bestreams",
    "gorillavid",
    "streamin",
    "vidzi",
    "vodlocker"
];

var versions = $('.movie_version');

for (var g = sites.length; g > 0; g--) {
  var site = sites[g];
  for (var i = versions.length; i > 0; i--) {
    var version = $(versions[i]).find('.version_host').text();
    console.log(version);
    if (version.indexOf(site) > -1) {
      window.location.assign($(versions[i]).find("a").attr("href"));
      i = g = -1;
    }
  }
}