Can I get Google slides' thumbnail url using Google App scripts? - google-apps-script

I'd like to get a thumbnail url of Google slides' page.
I checked that I can get a first page's thumbnail url by
var file = DriveApp.getFileById('IdOfSlide')
var url = Drive.Files.get(file.getId()).thumbnailLink
However I can not get a thumbnail url of a page in the middle of a slide, like page 10 or so.
Is there any way to get the thumbnail url of each page?

Related

When navigating to a different web page from a webpage should the URL of the new webpage contain the endpoint of the previous web page?

Suppose I have a web page let's say rooms.html and the URL of that page is "http://localhost:8000/hotel/rooms/". In that HTML page there is a link to add_room.html page, when I click on that link, I get redirected to add_room.html whose URL is "http://localhost:8000/hotel/add_room/". I want to know what should I keep the UPL of this page. Should it be "http://localhost:8000/hotel/add_room/" or "http://localhost:8000/hotel/rooms/add_room/". So bascically my question is that when navigating to a different web page from a webpage should the URL of the new webpage contain the endpoint of the previous web page?

Google Chrome Extension Get Details of the Page in Active Tab

I am creating a Google Chrome extension that collects details of the page loaded in active tab.
I am getting the page title and URL correctly, but the page HTML source is not loading.
This is the code I am using to get title and URL:
chrome.tabs.getSelected(null, function(tab) {
u = tab.url;
t = tab.title;
document.write("Title: "+t+"<br>URL: "+u);
});
How can I get the HTML source of the tab page?

Display images by url in google app maker

I have a model with url images in this format "https://drive.google.com/file/d/< id >/view".
Urls are referred to images stored on my Drive.
I have an image widget into form binding to the url in images model.
When I preview the app, the url works as href but image is not displayed in the form.
What's wrong? Someone can help me please?
Take a look at Images Sample(https://developers.google.com/appmaker/samples/images/), it does exactly what you want. Just in case, the 'prestige' of that sample is hidden behind this line of code in onCreate method of the DriveImage model:
record.ImageUrl = Drive.Files.get(record.Id).webContentLink;

Insert hyperlink from form to pdf

I'm trying to link a questionnaire composed in Forms to a pdf document. Ideally I'd like to web host the document and link directly to a page or section of said document.
Is there a way to, using script,
include a named hyperlink in a Form? And,
make the link point to a web hosted pdf at a particular page or section?
Thanks in advance,
Zak
This is image was taken from a PDF and saved as a jpg. And then uploaded to a form.
Here's an example of adding an image to a form:
// Open a form by ID and add a new image item
var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
var img = UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');
form.addImageItem()
.setTitle('Google')
.setHelpText('Google Logo') // The help text is the image description
.setImage(img);
Here's the link to reference documentation.

Ruby on Rails: link inside a gmaps marker description box redirects to a url appended to my website url

So I am using the rails 'link_to' method to redirect a user to an external website upon clicking on it (where the link is inside a google maps marker info box). I am using the Gmaps4rails gem. I am building the link inside the marker info window as below, in one of my controllers, where each #locations has a website as one of its attributes:
#hash = Gmaps4rails.build_markers(#locations) do |location, marker|
link = view_context.link_to "#{location.website}", location.website, target: "_blank"
description = "Website: #{link}"
marker.infowindow description
end
Everything gets plotted fine, and the links work fine for about half the markers, where if you click on the website link in the description you get redirected to the website in a new tab.
However, there are some website links in which my code acts strange; clicking on the url redirects you to my "website url + the marker's website url", concatenated into one url.Why is this happening?
For example, the url upon clicking on some of the website links in the markers redirects you to a url like this: "mywebsite.com/www.website_in_marker.com". And of course I get a page you are looking for does not exist error.
It's very likely that some of the links do not have a protocol (http, https, etc.) prepended to it. Anything in the href without a protocol is assumed to be a relative path, which is why some links are appended in relation to your site and others are not.
Going through and ensuring all links include a protocol would be one way to resolve the issue.
Hope it helps!