i'm using google slide in a embedded iframe, I've published it and I'm able to autostart but i can only autoloop or stop it once finished.I'd like, for example, to change iframe content once finished, there's a way or an api for google viewer to send an event once my presentation is finished.
Thanks
You can write a short/simple chrome extension that will do that.
Or use this extension: https://chrome.google.com/webstore/detail/auto-reload/ofojbjgaaddibdfpmmjeonahgbacejid
Related
I am trying to develop a chrome extension which can capture clicks using chrome extension APIs not by JavaScript.
If you want to capture the 'click' events in chrome extension, this answer might help you from the question - How may I get the element attributes (text, id, class and so on..) of the current tab, out of a mouse click, from a chrome extension?
In your content.js, write the following code-
$(window).click(function(event) {
console.log("Click event: ", event);
});
Content scripts are files that run in the context of web pages. By using the standard Document Object Model (DOM), they are able to read details of the web pages the browser visits, make changes to them and pass information to their parent extension.
I'm making a Chrome extension. I want to have an event triggered in response to when a web page asks for a user location.
What is this event called in the Chrome API?
I can't find documentation on this specifically. If anybody can point me in the right direction, I would appreciate it.
I'm building a Chrome extension that makes the badge show a number returned from an API. I have the code working fine, but I have it listening for DOMContentLoaded, so it only updates when the user opens up the extension.
I would like the extension to check the API every time the browser loads a page. I do not need to change anything in the page, I just want to use it for timing.
I'm not sure what I should be using, should I be using background pages, event pages, or something else? What would be the best way to go about this?
Thanks in advance!
The api you want for “every time the browser loads a page” is chrome.tabs.onUpdated. You’d have:
chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,tab) {
chrome.browserAction.setBadgeText({"text":"ABCD","tabId":tabId});
});
An easy approach for development is to use a background page, get it working, and then figure out what changes you need to convert it to an event page. With this stub however, nothing is stopping you from making it an event page.
I would like to embed a YouTube player onto a page and show it to a user. If a foreground popup is used to host the player then, when the popup loses focus, the player is destroyed because the entire popup is removed.
I was hoping to use webKitNotifications.createHTMLNotification() and embed a player inside of an HTML Notification, but the spec has since been deprecated.
Just curious if anyone has any really crafty ideas on how to achieve this? I suspect hosting the YouTube player on a background page is a violation of YouTube's Terms of Service.
Looking through the dev. channel APIs:
http://developer.chrome.com/extensions/notifications.html - Too restrictive compared to HTML Notification. Doesn't look like I can embed a YouTube player inside one of these guys.
and... that's really about it.
Advice appreciated. Thanks.
You can simply have an HTML file in your extension for your page, for instance video.html, list it in your manifest under web_accesible_resources, and show it using:
chrome.tabs.create({url: chrome.extension.getURL('video.html')});
Inside your page you can use whatever method you want to embed the YouTube player.
I am writing a chrome plugin in which I would like to receive events such as "load", "unload" of window and page. However, I'm not getting any concrete clue to start with.
Can anyone tell me how to capture DOM event in plugin?
Does Chrome support this feature?
Thank you.
You would need Content Scripts and you just add normal browser events to the JavaScript you inject as you stated in your question. Every page will have that content script and it will listen on those events.