MozillaZine

Skip annoying screen in Google image and bing video searches

Discussion of general topics about Mozilla Firefox
slickrcbd
 
Posts: 357
Joined: September 1st, 2010, 1:57 am

Post Posted January 15th, 2017, 9:19 pm

I don't know where to ask this question, as it is more for a Firefox extension, Stylish, or Greasemonkey request. I'm not sure how to formulate a search for this type of thing that gives me a useful result.

I don't know the proper term for that annoying page that you get taken to when you click on a video in Bing that shows the video embedded with offers for related searches and other videos, requiring you to click on a link to watch the video on the site. Half the time you have to goto the site to watch the video because they don't support viewing it from the Bing page.
I'd like to know if there is something for Stylish, Greasemonkey, or a Firefox addon that will let me skip the intermediate page and go right to the video from Bing.

I have a second, almost identical request. A Google image search has a similarly annoying page, there used to be a Stylish stylesheet that would skip it and take you right to the image when clicking on the thumbnail, then it stopped working and it was replaced with a Greasemonkey script on userscripts.org, but neither has worked for years. I can't find a replacement script, does anybody know of one?
Oh, an older version of the script
http://userscripts-mirror.org/scripts/show/62950

If this isn't the right place to ask where to find scripts like this, please point me to an appropriate forum. I can't even figure out what that thing on Bing video is properly called so I can't get any results searching for how to skip it.

therube

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

Post Posted February 2nd, 2017, 1:37 am

a video in Bing that shows the video embedded with offers for related searches and other videos

URL?

Anyhow, have you tried an ad blocker (like Adblock Plus or uBlock Origin)?
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

slickrcbd
 
Posts: 357
Joined: September 1st, 2010, 1:57 am

Post Posted February 2nd, 2017, 3:55 am

For what you quoted, search for anything in Bing video, then click on any result. You'll see what I'm talking about.

TheVisitor
 
Posts: 4655
Joined: May 13th, 2012, 10:43 am

Post Posted February 2nd, 2017, 4:49 am

slickrcbd wrote:For what you quoted, search for anything in Bing video, then click on any result. You'll see what I'm talking about.


I don't see anything of what I would call 'abnormal'. Can you post a screen-shot of what your seeing ?

how to post screen-shot: http://kb.mozillazine.org/Posting_a_scr ... _the_forum

slickrcbd
 
Posts: 357
Joined: September 1st, 2010, 1:57 am

Post Posted February 2nd, 2017, 11:01 am

Ok, when I click on a video, how do I skip being taken to this screen and go right to YouTube with the video instead?
Imagebingannoyance by slickrcbd, on Flickr

Frank Lion

User avatar
 
Posts: 20039
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted February 2nd, 2017, 12:00 pm

slickrcbd wrote:A Google image search has a similarly annoying page, there used to be a Stylish stylesheet that would skip it and take you right to the image

Just have JS disabled on Google - clicking the thumbnail then takes you straight to the website and exact page where the image comes from. Having JS disabled there also makes the search results load quicker and loads of filter options also appear, both on the Web results and Image results pages. I use YesScript for that.

No idea about 'Bing'. - Edit - have JS off there and vids will quickly go to its 'bing' video page, but with an Error message. Click the 'Try watching this video on http://www.youtube.com' and the video will open in Youtube.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

slickrcbd
 
Posts: 357
Joined: September 1st, 2010, 1:57 am

Post Posted May 28th, 2018, 8:51 am

I'd like to revive this with the same question again. I want to search for a video with Bing, then click on the result and get taken directly to the site hosting the video rather than having to WAIT for that "preview page" with suggested alternates to load, then click on the link to take me to the site. I just get frustrated as it loading all the previews just eats up time and memory. Especially time.
I want to skip the step of visiting the page shown above and go right to the site when I click on a result in Bing video.

Any suggestions?

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

Post Posted May 28th, 2018, 12:04 pm

I can change the links on the test page using a bookmarklet.

Code: Select all
javascript:(function(){

  var selector = "a.mc_vtvc_link + div.mc_vtvc_actc > div.mc_vfaa > div.sa_wrapper";
  var divs = document.querySelectorAll(selector);
  for (var i = 0; i < divs.length; i++) {
    var murl = JSON.parse(divs[i].getAttribute("data-eventpayload")).murl;
    var archor = divs[i].parentElement.parentElement.previousElementSibling;
    archor.setAttribute("href", murl);
    archor.style.backgroundColor = "gainsboro";
  }

})();

Test page
http://www.bing.com/videos/search?q=anime

Bookmarklet builder
http://subsimple.com/bookmarklets/jsbuilder.htm

Bookmarklet builder instructions:

* type name in name box
* paste code in code box
* click compress button
* drag link to toolbar

slickrcbd
 
Posts: 357
Joined: September 1st, 2010, 1:57 am

Post Posted May 28th, 2018, 1:59 pm

Thank you, Is there a way to get Greasemonkey to automatically use it every time I do a Bing search?

I don't know how to make greasemonkey scripts, I tried putting this into a new one, but it did not work, and don't know what I did wrong.

// ==UserScript==
// @name BingSkipPreview
// @namespace http*://www.bing.com/videos/search*
// @include http*://www.bing.com/videos/search*
// @version 1
// @grant none
// ==/UserScript==
(function(){

var selector = "a.mc_vtvc_link + div.mc_vtvc_actc > div.mc_vfaa > div.sa_wrapper";
var divs = document.querySelectorAll(selector);
for (var i = 0; i < divs.length; i++) {
var murl = JSON.parse(divs[i].getAttribute("data-eventpayload")).murl;
var archor = divs[i].parentElement.parentElement.previousElementSibling;
archor.setAttribute("href", murl);
archor.style.backgroundColor = "gainsboro";
}

})();

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

Post Posted May 28th, 2018, 2:48 pm

Try this:

Code: Select all
// ==UserScript==
// @name         Bing Video Search
// @match        http*://www.bing.com/videos/search?q=*
// @grant        none
// ==/UserScript==

(function () {

  "use strict";

  var selector = "a.mc_vtvc_link + div.mc_vtvc_actc > div.mc_vfaa > div.sa_wrapper";
  var divs = document.querySelectorAll(selector);
  for (var i = 0; i < divs.length; i++) {
    var murl = JSON.parse(divs[i].getAttribute("data-eventpayload")).murl;
    var archor = divs[i].parentElement.parentElement.previousElementSibling;
    archor.setAttribute("href", murl);
    archor.style.backgroundColor = "gainsboro";
  }

})();

The problem is the frame reloads on resizing or scrolling without reloading the user script. I don't know how to listen for when the page changes...

With a bookmarklet, I can just click the bookmarklet again when the page changes.

It isn't possible to change the Bing YouTube playlist url because the YouTube playlist url isn't available.

slickrcbd
 
Posts: 357
Joined: September 1st, 2010, 1:57 am

Post Posted May 28th, 2018, 7:20 pm

Does that mean that I copied the bookmarklet into a Greasemonkey script correctly, but it doesn't work because of dynamic loading?
I'm sorry, but web coding isn't my strong suit, I haven't really tried to learn since around the time that Netscape Navigator 3.0 Gold came out in the mid '90s.

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

Post Posted May 28th, 2018, 8:16 pm

I tested the user scripts in the web console in Firefox 60. It changes the upper links, but not the lower links when I scroll down the page. Perhaps our pages are different because of the browser version, extensions, settings or something else.

Here is how the dom looks like for me in the developer tools.

Code: Select all
<a class="mc_vtvc_link" href="...">...</a>
<div class="mc_vtvc_actc">
  <div class="mc_vfaa">
    <div class="sa_wrapper" data-eventpayload="...">...</div>
  </div>
</div>

mc_vtvc_link is a adjacent sibling to mc_vtvc_actc.
mc_vtvc_actc is a parent to mc_vfaa.
mc_vfaa is a parent to sa_wrapper.

Selector: a.mc_vtvc_link + div.mc_vtvc_actc > div.mc_vfaa > div.sa_wrapper

The user script fails if the selector is wrong.

Reference
http://developer.mozilla.org/en-US/docs/Web/CSS/Reference#Selectors

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 2 guests