Skip to content

Instantly share code, notes, and snippets.

@weakish
Created July 23, 2017 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weakish/27e407cee202ee48c0fc35c37fc5cdc6 to your computer and use it in GitHub Desktop.
Save weakish/27e407cee202ee48c0fc35c37fc5cdc6 to your computer and use it in GitHub Desktop.
new tab #extension for #chromium
url = "chrome://theme/IDR_THEME_NTP_BACKGROUND"
url = "about:chrome"
// chrome.tabs.update(
// {url: url}
// )
chrome.windows.getCurrent(function (window) {
alert(window.id)
})
// chrome.tabs.getAllInWindow(null, function (tabs) {
// if tabs.length
// })
// chrome.sessions.restore()
// document.location.href = "http://localhost"
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted.
This software is provided "as is" without express or implied warranty.
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted.
This software is provided "as is" without express or implied warranty.
{
"offline_enabled": true,
"chrome_url_overrides": {
"newtab": "newtab.html"
},
"manifest_version": 2,
"name": "New Tab Apps Page",
"version": "0.0.0"
}
<!DOCTYPE html>
<html class="starting-up" i18n-values="dir:textdirection;
hasattribution:hasattribution;
themegravity:themegravity;
bookmarkbarattached:bookmarkbarattached;
lang:language">
<head>
<meta charset="utf-8">
<title i18n-content="title">New Tab</title>
<meta name="viewport"
content="user-scalable=no, width=device-width, maximum-scale=1.0">
<!-- <style>
html {
background: url(https://css-tricks.com/examples/FullPageBackgroundImage/images/bg.jpg) no-repeat center center fixed;
background-size: cover;
}
</style>
--></head>
<body>
<script src="background.js"></script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment