// ==UserScript== // @name Fembed Helper // @namespace http://fembed.net/ // @version 1.2.2 // @description Hello to fembed but Bye to Ads // @author Me // @match https://dash.fembed.net/* // @downloadURL https://update.greasyfork.icu/scripts/395774/Fembed%20Helper.user.js // @updateURL https://update.greasyfork.icu/scripts/395774/Fembed%20Helper.meta.js // ==/UserScript== (function () { 'use strict'; $('div[data-id]').each(function () { var dataId = $(this).attr("data-id"); var buttons = $(this).find(".buttons").first(); buttons.append(createNewButton(dataId)); }); $(document).on('click', '.modal-close, .modal-background, .btn-close', function() { $(this).closest('#tarojs-player').remove(); $(this).closest('.modal').removeClass('is-active'); }); })(); function createNewButton(dataId) { var btn = $("") .attr("data-id", dataId) .append('') .append('Play'); btn.click(function () { var self = $(this); var dataId = self.attr("data-id"); self.addClass("is-loading"); $.post('/video/scene', { csrf_token: tarojs.csrf, id: dataId }, function (res) { if (!res.success) { tarojs.showAlert(res.data); return false; } //console.log(res.data); showPlayer(res.data); self.removeClass("is-loading"); }); }); return btn; } function showPlayer(url) { var html = '
'; html += ''; html += ''; html += '
'; html += ''; html += '