HungInLC / AFF Video Viewer

// ==UserScript==
// @name         AFF Video Viewer
// @namespace    http://openuserjs.org/users/HungInLC
// @version      0.1
// @description  See Videos and Chats with no gold
// @author       HungInLC
// @match        *://adultfriendfinder.com/*
// @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant        none
// @license      MIT
// ==/UserScript==

// ==OpenUserJS==
// @author HungInLC
// ==/OpenUserJS==

waitForKeyElements("#likebox", videoStep);
waitForKeyElements("#memberinfo", memberStep);
waitForKeyElements("div.viewer_upgrade_dialog", liveVideoStep);

function videoStep() {
  document.getElementById("likebox-left-bd-update").remove();
  document.getElementById("likebox-left-bd-mask").remove();
};

function memberStep() { //div.left.ibox-mem-videos
  $("div.ibox_mem_photos").each(function (index) {

    var img_path = $(this).find('img.filter').attr('src').replace("square", "main");

    var link = $(this).find('a').attr('href', img_path);
    link.attr('target', '_blank');

  });

};

function liveVideoStep() {
  $("div.viewer_upgrade_dialog").remove();
  $("div._std-mask").remove();
};