MozillaZine

Is there a way to stop floating videos?

Discussion of features in Mozilla Firefox
morat
 
Posts: 2323
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 14th, 2017, 6:28 am

@Jimac

Try this:

Code: Select all
// ==UserScript==
// @name         Daily Mail
// @include      http://www.dailymail.co.uk/*
// @grant        none
// @noframes
// ==/UserScript==

setInterval(function handler() {
  var element = document.querySelector(".vjs-flyout-close");
  if (element) {
    element.click();
  }
}, 1000);

Test page
http://www.dailymail.co.uk/news/article-4601902/

flimbo
 
Posts: 20
Joined: April 29th, 2011, 4:43 am

Post Posted June 14th, 2017, 7:55 am

Installed that script in Greasemonkey but sorry, it doesn't work.

morat
 
Posts: 2323
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 14th, 2017, 10:01 am

@flimbo

Try running the following code snippet in scratchpad after the video popup starts playing.

Code: Select all
document.querySelector(".vjs-flyout-close").click();

Instructions:

* tools > web developer > scratchpad
* edit > paste
* execute > run

Does the code snippet close the video popup or not?

flimbo
 
Posts: 20
Joined: April 29th, 2011, 4:43 am

Post Posted June 14th, 2017, 11:24 am

Yes that snippet in scratchpad closes the video.
Got it all working now.

Many thanks for providing this script. Cheers! :D

This is what my Greasemonkey script looks like...

Code: Select all
// ==UserScript==
// @name        Daily Mail
// @namespace   www.dailymail.co.uk
// @include     http://www.dailymail.co.uk/*
// @version     1
// @grant       none
// @noframes
// ==/UserScript==

setInterval(function handler() {
  var element = document.querySelector(".vjs-flyout-close");
  if (element) {
    element.click();
  }
}, 1000);

flimbo
 
Posts: 20
Joined: April 29th, 2011, 4:43 am

Post Posted June 14th, 2017, 12:54 pm

Only one problem, the videos can't be played at all now if I wanted to watch them.

morat
 
Posts: 2323
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 14th, 2017, 2:48 pm

@flimbo

Try this:

Code: Select all
// ==UserScript==
// @name         Daily Mail
// @include      http://www.dailymail.co.uk/*
// @grant        none
// @noframes
// ==/UserScript==

setTimeout(function handler() {
  var element = document.querySelector(".vjs-flyout-close");
  if (element && document.querySelector(".vjs-playing")) {
    element.click();
  } else {
    setTimeout(handler, 1000);
  }
}, 1000);

Test page 2
http://www.dailymail.co.uk/news/article-4604756/

flimbo
 
Posts: 20
Joined: April 29th, 2011, 4:43 am

Post Posted June 15th, 2017, 2:12 pm

That's done the trick. Many thanks morat! :)

morat
 
Posts: 2323
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 15th, 2017, 4:57 pm

You're welcome.

agentalbert
 
Posts: 9
Joined: October 28th, 2016, 5:05 pm

Post Posted June 22nd, 2017, 8:51 pm

I apologize for the dumb question, but I must not be applying this right. I opened scratchpad from the Tools-->Web Developer menu, typed "allow pasting" to paste in the script above (in Morat's 6/14 post) and if I have scratchpad open and then go execute --> run, it closes the window. But is there a way for it to automatically do this whenever I'm at the site, or do I manually need to open scratchpad and run this everytime?

morat
 
Posts: 2323
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 22nd, 2017, 11:20 pm

@agentalbert

Try installing the latest userscript.

Greasemonkey
http://addons.mozilla.org/firefox/addon/748
http://wiki.greasespot.net/

Instructions:

* install extension
* create dailymail.user.js file with notepad
* open dailymail.user.js file with browser
* install user script
* test page

I asked flimbo to use scratchpad to troubleshoot the userscript since he said the userscript didn't work.

agentalbert
 
Posts: 9
Joined: October 28th, 2016, 5:05 pm

Post Posted June 23rd, 2017, 6:20 am

I think I've got it. Now the vids open but after about 1 second they auto-close. Wish I could keep them from opening and sliding down the page at all, but this is certainly better. Thanks for your help.

Jimac
 
Posts: 5
Joined: May 11th, 2017, 9:23 am

Post Posted June 23rd, 2017, 9:15 am

Well, I uninstalled the Greasemonkey program from my computer, but someday I'll try morat's new script, but for now, for those reading this who find all this coding talk intimidating, I can report the following method works for me on Daily Mail's site to stop the sticky video player from dropping down and auto playing in articles. Works on other sites, too.

In your Firefox browser, try installing the YesScript add-on. It is an easy click on, click off javascript blocker. That's all it does, no other settings to sort through. It creates a click-on, click off javascript blacklist. When you visit a domain that you've blocked javascript on, the icon in the toolbar turns black. Click the icon and the javascript gets unblocked and the icon clears. Refresh the page to get the scripts working again. It blocks javascript on all pages of the domain, not specific URLs. You click on any web page address of the domain to get the domain blocked. Easy.

If you have the dailymail.co.uk domain blocked using YesScript, here's what happens (by the way, I am describing this using FF's privacy browser on Windows 10, not yet received the Creators 10 update): the home page will not show any looped preview clips from videos, only a still image, usually. Everything else seems to appear and work okay. I like those looped previews, so that's a loss. The page loads much faster though.

In an article, the video player shows just a gray screen, no looped preview or still, and the player remains in place, does not shrink and drop to the lower right and does not play automatically. The video and sound WILL play by just clicking on the player. The article always contains still images from the video so you know what will be on it.

The main problem with YesScript and Daily Mail is that it blocks the Comments from appearing at the bottom of the article. The Comments section appears, but it says 0 comments. If you like reading the comments, or are registered to post them, you would have to unclick the YesScript icon and refresh the page to get the javascript elements working again, then all appears and works normally.

YesScript will also stop pages on other sites that have an annoying autorefresh (like Drudge Report) and back button disablers. On Drudge Report, some of the photos won't appear if javascript is blocked, so I just open up my Edge browser for a few seconds to see what they are (set to Drudge as the home page), then go back to FF.

So, I can confirm that the YesScript add-on will stop the sticky video player, but there are some drawbacks, but it is an easy solution for some. I also have it installed on a Vista operating system laptop and have used it for years. Read more about the add-on here. I have no connection to it: https://addons.mozilla.org/en-US/firefo ... yesscript/

rebeltaz

User avatar
 
Posts: 7
Joined: May 24th, 2010, 12:45 am
Location: Shelby, AL

Post Posted June 25th, 2017, 1:35 pm

Add me to the "me too" crowd. I am so surprised that there aren't enough people annoyed by this intrusion that someone, somewhere hasn't written a plugin to block this behaviour!

ChrisLongski
 
Posts: 3
Joined: June 30th, 2017, 3:50 pm

Post Posted June 30th, 2017, 3:53 pm

These scripts have Zero effect on the floating videos. The new script window is confusing. Vista/Firefox 52.2.1

therube

User avatar
 
Posts: 17396
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted July 3rd, 2017, 1:03 pm

URL to these floating videos?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

Return to Firefox Features


Who is online

Users browsing this forum: No registered users and 2 guests