Tips for turning off the full screen feature in Google’s web viewer

I have been using an embedded Google Viewer with iframe to display a PDF. I am trying to remove the full-screen popout feature from it and disable right-click within the iframe.

I have tried several solutions but nothing seems to work. The URLs for my PDFs are stored in a database.

Here is my code:

<iframe id="display" src="https://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&pid=explorer&efh=false&a=v&chrome=false&embedded=true" style="width:1000px; height:1000px;" frameborder="0"></iframe>

I attempted to change the CSS like this:

<script type="text/javascript">
var iframe = jQuery("#display").contents().find("aria-label").css( "display", "none" );

Can someone please assist me?

Answer №1

I encountered a similar problem with the google docs viewer, but I was able to find a solution by implementing some CSS:

div[role="toolbar"] {
    display: none;
}

This code snippet effectively hides the popout div of the google docs viewer.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Including CSS in an HTML file does not function properly

I've been attempting to import a CSS file into an HTML document, but for some reason it's not working. I have also tried linking the path directly, but that hasn't worked either. <!DOCTYPE html> <html lang="en"> <head> < ...

What is the best way to show my results in a single line?

$(document).ready(function() { $("#submitForecast").click(function() { return getForecast(); }); }); function getForecast() { var city = $("#city").val(); var days = $("#days").val(); if (city != '' && days != '' ...

Adding custom JavaScript files to a React project: A step-by-step guide

Is it possible to include JavaScript files stored in the public folder into React components located in the src component folder of a React create application? ...

Using jQuery, inject code and text into an element

There's a situation where I have an array with exactly 3 entries. First Entry: <i class="fa fa-star" aria-hidden="true"></i><i class="fa fa-star" aria-hidden="true"></i><i class="fa fa-star" aria-hidden="true"></i> ...

Problems with CSS: Struggles with Overflow-x and display:flex

I have already completed 2 questions regarding the current issue I am facing. However, I have now created a more improved example. Please take a look below. The boxes are being loaded using Angular ng-bind. Check out the code pen here: http://codepen.io/a ...

Using CodeIgniter to dynamically load colors from a database into a CSS color selector

My views are populated by an array that holds all the necessary information... This array also includes user profile data, with a link key and color value specified... Is there a way to pass this information into the CSS color selector so that each user& ...

JQuery experiences unpredictable changes in event targets

I have a collection of hyperlinks within a ul, and I am looking to track clicks on these hyperlinks. The div structure is outlined as follows, <div style="margin:3%;" id="city-list"> <ul data-role="listview" data-theme="b" data-filter=" ...

Facing issues with ng-options duplication?

I have provided the code below that I would like to display: $scope.states="India"; $scope.cities="Madhya Pradesh"; $scope.city="Ajmer"; When attempting to implement this in a cascading dropdown format, I encountered an error. You can find my jsfidd ...

CSS Flexibility

Greetings everyone, it's been a while since I dabbled in web development. I recently worked on my site with the intention of making it responsive using flexbox. This is my first time posting here, so please guide me on how to seek help more effective ...

Loop through the JSON data to generate clickable links in the innerHTML

I've been searching through various resources for a solution to the issue I'm facing. My goal is to iterate through a JSON object and extract all the ids and corresponding dates from each top_worst section. The structure of the JSON data is as fo ...

Click the submit button to display a div element without having to refresh the page

Is it possible to display a spinner for a couple of seconds before the page reloads upon submitting a form? <form class="ready" action="https://link.com" method="post"> <input name="test" type="submit" class="click" value="order"/> </form&g ...

What is the best way to eliminate the border around an image when including a hyperlink?

There seems to be a rectangle showing up outside the link that I would like to remove. How can I get rid of it? No Image <a href="~/Web Pages/Home.aspx" runat="server"> <img src="<%= ResolveUrl("~/Images/TestToday.png") %>" alt="No im ...

Ways to modify CSS rules by adding or removing the !important declaration in new CSS

For my project, I am using the `bootstrap-next-table` table in various places and have customized a CSS class to fit my needs. The issue I am currently encountering is that one component requires the default CSS class which I had overridden: .table > t ...

The Bootstrap carousel is stuck and not moving

I'm really struggling to figure out why the bootstrap carousel code isn't working for me. It's frustrating because I followed the example on the bootstrap website and only made minor customizations, so it should be functioning properly. I su ...

Enrich an HTML table using jQuery based on an indentation pattern

                 Overview: Currently, my colleague and I are working on developing an inventory control system using the Django Framework within our department. While most aspects of the system are operational, we are encountering ...

Differences between Jquery's Find Method and ID Attribute

In my search for efficiency, I am currently exploring ways to quickly access an element. Which method is faster: $('body').find('#elemID'); vs. var id = $('#elemID'); ...

What are the steps to overlay a button onto an image with CSS?

As a CSS newbie, I have a question that may seem silly or straightforward to some. I am struggling with placing a button over an image and need guidance on how to achieve this effect. Specifically, I want the button to appear like this blue "Kopit" button ...

Issue with Jquery not updating the background-size attribute

Having just started out, I'm having trouble understanding why my code won't properly execute the following: var h = $( window ).height(); $('.bg').css({ 'height' : h, 'background-size' : "auto" + h }) Sp ...

The picture within the bootstrap popover is spilling out of the popover

I need help resolving an issue on my webpage where images in popovers overflow when they reach a certain size. I used an online demo to create the page, but now I'm encountering this problem. How can I fix it? Check out the Js Fiddle for reference: h ...

Looking to access the layout details of an HTML element similar to what can be done in Firefox's debugger tool?

I am facing a challenge with a aspx.net grid control where I need to extract the first row's information and copy it into another table using JavaScript. To achieve this, I am attempting to calculate the width of each cell in the first row by accessin ...