Google Apps Script remove warning banner

google apps script html table
google script pass variable to html
template html google-apps script
google sites apps script
google apps script url parameters
google apps script parameters
google apps scriptlets
embed google web app in website

I am putting a GeoChart on my Google Site using a Google Apps Script. Viewing the page when I am not logged into my google account shows a grey banner at the top with states: "This application was created by another user, not by Google." See it here.

Is there a way to remove this banner or move it to the bottom of the page so it looks better? I found a short discussion here (see fourth comment), but this did not work with the HtmlOutput object I am using in the doGet

function doGet() {
return HtmlService.createHtmlOutputFromFile('prate').setSandboxMode(HtmlService.SandboxMode.IFRAME);
}

The two options that would seem possible for suppressing that warning from a WebApp made using HtmlService are:

  1. Custom CSS, e.g. in Stylesheet.html (assuming you've started from the WebApp script template).

    .warning-bar {
      visibility: hidden;
    }
    

    I tried this, and found it had no effect on the final display. If there is an element with class="warning-bar" inside the iframe'd HTML, that element will be hidden. Likewise if we try to modify the warning bar by id, #warning; no impact on the element outside of our iframe.

    There is no CSS support for parent elements, so this is a dead end.

  2. Use client-side JavaScript to manipulate the elements outside of our iframe. By adding code to JavaScript.html (again, assuming WebApp script template), we can try to change document elements.

    With jQuery:

    $('.warning-bar:first',parent.document).hide();
    

    With pure JavaScript:

    top.getElementById('warning').style.display = 'none';
    

    Neither of those work. The configuration that Google uses for hosting Google Apps Script blocks JavaScript running in an iframe from accessing items in the parent page. Here's the error that shows up in the JavaScript console:

    Uncaught SecurityError: Blocked a frame with origin "https://n-gtoiuxrqufcpexrnkeysovsfb7ibnjwczjyz6ii-script.googleusercontent.com" from accessing a frame with origin "https://script.google.com". Protocols, domains, and ports must match.

    They've forced our script's iframe to have a host domain that differs from that of the surrounding document, enabling the single-domain security policy to block the exact sort of actions we're trying to do.

According to the issue you linked to in your quesiton, the only option for avoiding that annoying message is to switch to a paid Google Apps Domain (e.g. Business or Education).

Web App, Web App - Remove "This application was created by another user, not by Google​." - Part 11 Duration: 10:44 Posted: Mar 20, 2019 apps-script-remove-warning. Webpages deployed via Google App Scripts now include an annoying message on top of an iframe. Specifically this happens when the app is deployed for everyone (anonymous access on the web).

For anyone who cares, i got around this by embedding a google page with this issue in an iframe and using negative margins. Cant see the bars. Just throwing it out there in-case anyone else could use the suggestion

Google Apps Script remove warning banner, I am putting a GeoChart on my Google Site using a Google Apps Script. Viewing the page when I am not logged into my google account shows a grey banner at  On the page where you see a warning, click Details. Click Visit this unsafe site. The page will load. When you visit an unsafe site, Chrome will try to remove the unsafe content from the page.

If you embed the Google Script web app in another website using the IFRAME tag, the warning banner will be hidden. Make sure you set the page's X-Frame-Options header to XFrameOptionsMode.ALLOWALL and it will let any site iframe the web app page.

See docs.

Google Apps Script remove warning banner, Google Apps Script remove warning banner, If you embed the Google Script web app in another website using the IFRAME tag, the warning banner will be  Determines if the protected area is using "warning based" protection. remove() void: Unprotects the range or sheet. removeEditor(emailAddress) Protection: Removes the given user from the list of editors for the protected sheet or range. removeEditor(user) Protection: Removes the given user from the list of editors for the protected sheet or range.

I'm successfully using the Chrome extension Custom JavaScript for websites for this. It allows you to run any JavaScript on any domain.

To hide the Google warning banner, just enter the following code in the custom JavaScript window:

document.getElementById('warning').style.display = 'none';

And hit save. It will be applied right away.

luanpotter/apps-script-remove-warning: Removes that , Removes that annoying warning added by Google App Scripts now - luanpotter/​apps-script-remove-warning. Enable the Admin Directory API advanced service in your script. Step 3: Run the sample. In the Apps Script editor, click Run > listUsers. The first time you run the sample, it will prompt you to authorize access: Click the Continue button. Click the Accept button. To view the script's output, click View > Logs.

If you embed it in a google site the banner will not display.

Google App Scripts – solidfish, Google App Script allows extensible functions to be created to work with G Suite products It contains a warning banner that cannot be removed. https://​stackoverflow.com/questions/44970940/how-to-remove-warning-this-  Apps Script is a rapid application development platform that makes it fast and easy to create business applications that integrate with G Suite. Start Scripting. Build with Google. Feature-rich

New security protections to reduce risk from unverified apps , Extending security protections to Google Apps Script access, as well as a banner identifying web pages and forms created by other users. processes — A representation of a script function execution. The API provides methods to list existing processes and gather information about them, such as type and current status. scripts — The endpoint that provides methods to remotely execute Apps Script functions. Except as otherwise noted, the content of this page is licensed under the

Class Ui | Apps Script, Ui. An instance of the user-interface environment for a Google App that allows the script to add features like menus, dialogs, and sidebars. Step 2: Turn on the Google Docs API. Enable the Google Docs API advanced service in your script. Step 3: Run the sample. In the Apps Script editor, click Run > printDocTitle. The first time you run the sample, it will prompt you to authorize access: Click the Continue button. Click the Accept button. To view the script's output, click View > Logs.

Howto place an afiliate banner on google sites side bar, You cannot add script to html code. The best way will be to make google gadget and then add that google gadget to sidebar. Mori. 8/27/09. Mori. @ Shalinder,. This extension shows a warning banner on the page when visiting a specified set of URLS Thanks to Edward Wang for improved CSS resets and preventing duplicated banners, and Michael Lefkowitz for adding the ability to move the banner to the bottom.

Comments
  • In the FireFox dev tools I can set .warning-bar's visibility: none and the grey bar goes away. That's more-or-less what the 2011 UiService work-around was doing, so it may be possible to control this with custom CSS.
  • Thanks @Mogsdad for the help, not the answer I was hoping for but thats ok. I just decided to change the way I put the maps on the page so that the banner only shows up once at the very top. Seems like the best solution for now.
  • Are you aware if this still is working for you in 2019?