Skip to content

Instantly share code, notes, and snippets.

@omarstreak
omarstreak / content.js
Created June 8, 2016 18:55
Gmail iframes
/* this file is the "app" file that loads the sdk and brings up the iframe */
function log() {
console.log.apply(console, ['iframe-test'].concat(Array.prototype.slice.call(arguments)));
}
InboxSDK.load(1, 'iframe-test').then(function(sdk) {
sdk.Compose.registerComposeViewHandler(function(composeView) {
composeView.addButton({
title: "iframe test",
@omarstreak
omarstreak / background.js
Last active October 22, 2023 15:44
Chrome API Extension
//oauth2 auth
chrome.identity.getAuthToken(
{'interactive': true},
function(){
//load Google's javascript client libraries
window.gapi_onload = authorize;
loadScript('https://apis.google.com/js/client.js');
}
);