Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name fili tv stream url by gamsteron
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://fili.cc/film/*
- // @match https://fili.cc/serial/*
- // @match https://gounlimited.to/*
- // @match https://vidoza.net/*
- // @match https://streamcherry.com/*
- // @match https://streamango.com/*
- // @run-at document-start
- // @grant unsafeWindow
- // ==/UserScript==
- (function() {
- 'use strict';
- var url = window.location.href;
- if (url.includes("fili.cc")) {
- return
- }
- function Empty(x){
- return typeof(x) == 'undefined';
- }
- function EmptyArray(x){
- return Empty(x) || x.length === 0;
- }
- function EmptyString(x){
- return Empty(x) || x === "";
- }
- function ExistElement(x){
- return !Empty(x) && x != null;
- }
- function removeStyles(el) {
- el.removeAttribute('style');
- if(el.childNodes.length > 0) {
- for(var child in el.childNodes) {
- /* filter element nodes only */
- if(el.childNodes[child].nodeType == 1) {
- removeStyles(el.childNodes[child]);
- }
- }
- }
- }
- function ReplaceInnerHTML(tag, replacement){
- var x = document.getElementsByTagName(tag);
- for (var i = 0; i < x.length; i++) {
- var element = x[i];
- if (ExistElement(element)) {
- element.innerHTML = replacement;
- }
- }
- }
- function copyText(text){
- var textarea = document.createElement('textarea');
- textarea.textContent = text;
- document.body.appendChild(textarea);
- var selection = document.getSelection();
- var range = document.createRange();
- range.selectNode(textarea);
- selection.removeAllRanges();
- selection.addRange(range);
- var copySuccess = document.execCommand('copy');
- selection.removeAllRanges();
- document.body.removeChild(textarea);
- if (copySuccess) {
- var successElement = document.createElement('h1');
- successElement.innerHTML = "video link copied to clipboard!";
- successElement.style.color = "red";
- successElement.style.textAlign = "center";
- document.body.appendChild(successElement);
- }
- }
- (function GetVideoDownloadLink(){
- var intervalID;
- var VideoLink = "";
- var action = function(){
- var videoElements = document.getElementsByTagName("video");
- for (var i = 0; i < videoElements.length; i++) {
- var video = videoElements[i];
- if (ExistElement(video) && !EmptyString(video.src)) {
- if (VideoLink === ""){
- VideoLink = video.src;
- }
- removeStyles(document.body);
- ReplaceInnerHTML("body",
- '<br><br><br><br><br><br>' +
- '<center>' +
- '<a id="videoLinkA" style="color:red;" href="' + VideoLink + '">' +
- '<p id="textToCopy" style="font-size:1.5vw;color:white;">' + VideoLink + '</p>' +
- '</a>' +
- '</center>' +
- '<style>' +
- 'a#videoLinkA:link, a#videoLinkA:visited {' +
- 'background-color: #f44336;' +
- 'color: white;' +
- 'padding: 14px 25px;' +
- 'text-align: center;' +
- 'text-decoration: none;' +
- 'display: inline-block;' +
- '}' +
- 'a#videoLinkA:hover, a#videoLinkA:active {' +
- 'background-color: red;' +
- '}' +
- '</style>'
- );
- copyText(document.getElementById("textToCopy").innerHTML);
- clearInterval(intervalID);
- break;
- }
- }
- };
- intervalID = setInterval(action, 50);
- })()
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement