MozillaZine

Is there a way to stop floating videos?

Discussion of features in Mozilla Firefox
Mojo88

User avatar
 
Posts: 33
Joined: August 17th, 2013, 6:20 pm
Location: The corrupt fiefdom called 'Rhode Island'

Post Posted August 31st, 2016, 4:03 pm

I love my Firefox. It has soooo many nifty features and add-ons.

I'm hoping you folks can suggest a way to stop nagging floating videos that are appearing on more and more web sites. In other words, if the page has a video, I have FF set so that it will not auto-play them. But then if I scroll down the page, that video window will become it's own little nag and relocate down to lower right corner (usually) and just sit there until closed. These things are a real PITA. I am using AdBlock Plus already, along with Flashblock and NoScript.

Before anyone starts chastising me for being lazy, I have indeed Googled this issue (a few times) and could not find answer.

Can someone here help? Many thanks, Dave F. in Rhode Island
Last edited by Mojo88 on September 1st, 2016, 1:24 pm, edited 1 time in total.

dfoulkes

User avatar
 
Posts: 21880
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Post Posted August 31st, 2016, 4:45 pm

You might want to post a link to one of those sites...

I can't remember the last time I saw that happen on any site that I visit... maybe I just don't get into those sites.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!

Mojo88

User avatar
 
Posts: 33
Joined: August 17th, 2013, 6:20 pm
Location: The corrupt fiefdom called 'Rhode Island'

Post Posted August 31st, 2016, 4:58 pm

dfoulkes wrote:You might want to post a link to one of those sites.......


Here's one: http://www.providencejournal.com/opinio ... refighting
You'll see it happen when you scroll down past the big video, then shortly after the big vid is off screen, the new floating window appears.

Many thanks for the tip! :D
Last edited by Mojo88 on September 2nd, 2016, 5:05 am, edited 1 time in total.

WaltS48

User avatar
 
Posts: 3116
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted August 31st, 2016, 5:49 pm

Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

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

Post Posted August 31st, 2016, 11:34 pm

You can use site-specific user scripts to close floating videos.

Code: Select all
// www.providencejournal.com
document.addEventListener("DOMNodeInserted", function nodeInserted(event) {
  document.removeEventListener("DOMNodeInserted", nodeInserted, false);
  setTimeout(function () {
    var element = document.querySelector(".js-tout-tagalong-close");
    if (element) {
      element.click();
    }
  }, 3000);
}, false);

Code: Select all
// abcnews.go.com
var element = document.querySelector("#close");
if (element) {
  element.click();
}

Mojo88

User avatar
 
Posts: 33
Joined: August 17th, 2013, 6:20 pm
Location: The corrupt fiefdom called 'Rhode Island'

Post Posted September 1st, 2016, 6:54 am

morat wrote:You can use site-specific user scripts to close floating videos.

Code: Select all
// www.providencejournal.com
document.addEventListener("DOMNodeInserted", function nodeInserted(event) {
  document.removeEventListener("DOMNodeInserted", nodeInserted, false);
  setTimeout(function () {
    var element = document.querySelector(".js-tout-tagalong-close");
    if (element) {
      element.click();
    }
  }, 3000);
}, false);

Code: Select all
// abcnews.go.com
var element = document.querySelector("#close");
if (element) {
  element.click();
}



Thank you. :)

How/where do I plug in these scripts?

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

Post Posted September 1st, 2016, 8:24 am

Mojo88 wrote:How/where do I plug in these scripts?

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

Instructions:

* install extension
* create providence.user.js file with notepad

Code: Select all
// ==UserScript==
// @name         Providence Journal
// @namespace    http://www.providencejournal.com/
// @include      http://www.providencejournal.com/*
// @grant        none
// @noframes
// ==/UserScript==

document.addEventListener("DOMNodeInserted", function nodeInserted(event) {
  document.removeEventListener("DOMNodeInserted", nodeInserted, false);
  setTimeout(function () {
    var element = document.querySelector(".js-tout-tagalong-close");
    if (element) {
      element.click();
    }
  }, 3000);
}, false);

* open providence.user.js file with browser
* install user script
* test page

Greasemonkey 3.9
Firefox 48.0
Windows 7 SP1 32-bit

dfoulkes

User avatar
 
Posts: 21880
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Post Posted September 1st, 2016, 8:46 am

FYI ... I tested both links ... each in my test profile that only has uBlock installed... and at both sites that crappy breakout stuff happened...

Then I tested them in this profile which has uBlock and NoScript ... neither sited had that problem... check that first site to see how many scripts it was blocking... something like... 20 or so... the second site might have had 10+ scripts blocked... I did not temp allow any scripts to see what happened... figured that you must have scripts allowed for that first site... so, maybe disabling one or two at a time will find the offending script.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!

Mojo88

User avatar
 
Posts: 33
Joined: August 17th, 2013, 6:20 pm
Location: The corrupt fiefdom called 'Rhode Island'

Post Posted September 2nd, 2016, 5:08 am

morat wrote:
Mojo88 wrote:How/where do I plug in these scripts?

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

Instructions:

* install extension
* create providence.user.js file with notepad

Code: Select all
// ==UserScript==
// @name         Providence Journal
// @namespace    http://www.providencejournal.com/
// @include      http://www.providencejournal.com/*
// @grant        none
// @noframes
// ==/UserScript==

document.addEventListener("DOMNodeInserted", function nodeInserted(event) {
  document.removeEventListener("DOMNodeInserted", nodeInserted, false);
  setTimeout(function () {
    var element = document.querySelector(".js-tout-tagalong-close");
    if (element) {
      element.click();
    }
  }, 3000);
}, false);

* open providence.user.js file with browser
* install user script
* test page

Greasemonkey 3.9
Firefox 48.0
Windows 7 SP1 32-bit



THANK YOU very much for the info. I am gonna install Greasemonkey and try those scripts. 8-)

-

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

Post Posted September 2nd, 2016, 7:40 am

On second thought, I rather not use a DOMNodeInserted event listener since mutation events have been marked as deprecated.

Try these:

Code: Select all
// ==UserScript==
// @name         Providence Journal
// @include      http://www.providencejournal.com/*
// @grant        none
// @noframes
// ==/UserScript==

setTimeout(function handler() {
  var element = document.querySelector(".js-tout-tagalong-close");
  if (element) {
    element.click();
  } else {
    setTimeout(handler, 1000);
  }
}, 1000);

Code: Select all
// ==UserScript==
// @name         ABC News
// @include      http://abcnews.go.com/*
// @grant        none
// @noframes
// ==/UserScript==

setTimeout(function handler() {
  var element = document.querySelector("#close");
  if (element) {
    element.click();
  } else {
    setTimeout(handler, 1000);
  }
}, 1000);

The setTimeout method has negligible overhead so the script won't slow down the site.
Last edited by morat on September 4th, 2016, 8:03 am, edited 1 time in total.

Mojo88

User avatar
 
Posts: 33
Joined: August 17th, 2013, 6:20 pm
Location: The corrupt fiefdom called 'Rhode Island'

Post Posted September 2nd, 2016, 10:44 am

morat wrote:On second thought, I rather not use a DOMNodeInserted event listener.

Code: Select all
// ==UserScript==
// @name         Providence Journal
// @namespace    http://www.providencejournal.com/
// @include      http://www.providencejournal.com/*
// @grant        none
// @noframes
// ==/UserScript==

setTimeout(function handler() {
  var element = document.querySelector(".js-tout-tagalong-close");
  if (element) {
    element.click();
  } else {
    setTimeout(handler, 1000);
  }
}, 1000);

The setTimeout method has negligible overhead.



Well, what you just said is all Greek to me, so I guess I will not attempt any of it. Thanks anyway.

Bruce L.
 
Posts: 100
Joined: August 3rd, 2006, 4:36 am

Post Posted December 9th, 2016, 10:24 pm

Mojo88 wrote:Well, what you just said is all Greek to me, so I guess I will not attempt any of it. Thanks anyway.


I'm in the same boat, as I bet the vast majority of FF users are. I've been using FF since 2004.

This auto-playing of videos has really been annoying me for a long time. Periodically I check for some quick way of preventing them, via add-on or whatever, but never find anything simple or useful.

Why is this such a difficult thing to prevent? At 66, I'm hardly interested in a four-year college course in software to figure it out. This is another great example of technology advancing faster than our ability to fix it when something goes wrong.

If there is ONE PERSON out there who WANTS videos to play automatically, post here or "forever hold your peace." I'm betting that 99.9999999% of FF users DO NOT WANT them to play automatically.

Return to Firefox Features


Who is online

Users browsing this forum: No registered users and 1 guest