javascript – Removing Powered By GetYourGuide-ThrowExceptions

Exception or error:

I am using a widget from in one of my online projects. Here’s the widget code:

<div id="guide-display"></div>

<script async defer src="" onload="GYG.Widget(document.getElementById('guide-display'),{'currency':'USD','localeCode':'en-US','partnerId':'MGXXXX','q':'London'});">

This code displays the widget, along with a powered by link at the bottom of the widget.

You can see the widget here.

Tried removing the link using various methods, but failed. Any help would be greatly appreciated. Thanks.

How to solve:

The content is inside an iframe, on their domain, so you cannot alter it from your own domain thanks to CORS protection, which is a great thing. Imagine a website which displays a Facebook iframe, and accesses it to get info about you. That would be dangerous.

You can, however, put something in front of it. Like this:

  position: relative;
#guide-display:after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 20px;
  background: #fff; /* Or another color, depending on your website */

Disclaimer: I think they wouldn’t like you doing this. But I looked at their terms of use, they don’t mention anything about altering/hiding the contents of their widgets. So you get the benefit of the doubt.


You can render a div in top of the widget you want to hide

check this widget: example

 #hidder {
  display: block;
  position: relative;
  background-color: #ff0000;
  height: 20px;
  top: -20px;
  z-index: 1000;

I made the div red to make it obvious

Leave a Reply

Your email address will not be published. Required fields are marked *