aboutsummaryrefslogtreecommitdiff
path: root/viewtube.js
diff options
context:
space:
mode:
Diffstat (limited to 'viewtube.js')
-rw-r--r--viewtube.js63
1 files changed, 0 insertions, 63 deletions
diff --git a/viewtube.js b/viewtube.js
index dda3e99..5ed5a7a 100644
--- a/viewtube.js
+++ b/viewtube.js
@@ -519,68 +519,6 @@
}
}
-
- // ==========Websites========== //
-
- // Fixes
-
- var blockObject = page.doc;
- var blockInterval = 50;
-
- function blockVideos() {
- var elVideos = getMyElement(blockObject, 'video', 'tag', '', -1, false);
- if (elVideos.length > 0) {
- for (var v = 0; v < elVideos.length; v++) {
- var elVideo = elVideos[v];
- if (elVideo && elVideo.id != 'vtVideo' && elVideo.currentSrc) {
- if (!elVideo.paused) {
- elVideo.pause();
- if (page.url.indexOf('youtube.com/watch') == -1) elVideo.src = "#";
- }
- }
- }
- }
- var elEmbeds = getMyElement(blockObject, 'embed', 'tag', '', -1, false) || getMyElement(blockObject, 'object', 'tag', '', -1, false);
- if (elEmbeds.length > 0) {
- for (var e = 0; e < elEmbeds.length; e++) {
- var elEmbed = elEmbeds[e];
- if (elEmbed && elEmbed.id != 'vtVideo' && elEmbed.parentNode) {
- elEmbed.parentNode.removeChild(elEmbed);
- }
- }
- }
- if (blockObject !== page.doc) {
- var elFrames = getMyElement(blockObject, 'iframe', 'tag', '', -1, false);
- if (elFrames.length > 0) {
- for (var e = 0; e < elFrames.length; e++) {
- var elFrame = elFrames[e];
- if (elFrame && elFrame.parentNode)
- elFrame.parentNode.removeChild(elFrame);
-
- }
- }
- }
- }
- blockVideos();
-
- page.win.setInterval(function() {
-
- // Force page reload on title and location change
- if (page.title != page.doc.title && page.url != page.win.location.href) {
- if (player['playerSocket']) styleMyElement(player['playerSocket'], {display: 'none'});
- page.title = page.doc.title;
- page.url = page.win.location.href;
- page.win.location.reload();
- }
-
- // Block videos
- if (blockObject && blockInterval > 0) {
- blockVideos();
- if (blockInterval > 0) blockInterval--;
- }
-
- }, 500);
-
// =====YouTube===== //
/* Redirect Categories */
@@ -760,7 +698,6 @@
styleMyElement(myPlayerWindow, {position: 'relative', width: ytPlayerWidth + 'px', height: ytPlayerHeight + 'px', backgroundColor: '#FFFFFF'});
modifyMyElement(ytPlayerWindow, 'div', '', false, true);
ytPlayerWindow.appendChild(myPlayerWindow);
- blockObject = ytPlayerWindow;
/* Update Sizes */
page.win.addEventListener('resize', function() {