1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

start of extension popup window

This commit is contained in:
kumavis 2015-12-22 13:07:30 -08:00
parent 9f7b00f10a
commit 709d93b5a1
5 changed files with 58 additions and 6 deletions

View File

@ -35,6 +35,13 @@ module.exports = function (grunt) {
},
tasks: ['browserify:dev'],
},
html: {
files: ['<%= config.app %>/{,*/}*.html'],
options: {
livereload: '<%= connect.options.livereload %>'
},
tasks: ['copy'],
},
gruntfile: {
files: ['Gruntfile.js']
},
@ -98,6 +105,7 @@ module.exports = function (grunt) {
'<%= config.dist %>/scripts/background.js': ['<%= config.app %>/scripts/background.js'],
'<%= config.dist %>/scripts/contentscript.js': ['<%= config.app %>/scripts/contentscript.js'],
'<%= config.dist %>/scripts/inpage.js': ['<%= config.app %>/scripts/inpage.js'],
'<%= config.dist %>/scripts/popup.js': ['<%= config.app %>/scripts/popup.js'],
},
},
dev: {
@ -108,6 +116,7 @@ module.exports = function (grunt) {
'<%= config.dist %>/scripts/background.js': ['<%= config.app %>/scripts/background.js'],
'<%= config.dist %>/scripts/contentscript.js': ['<%= config.app %>/scripts/contentscript.js'],
'<%= config.dist %>/scripts/inpage.js': ['<%= config.app %>/scripts/inpage.js'],
'<%= config.dist %>/scripts/popup.js': ['<%= config.app %>/scripts/popup.js'],
},
},
},

View File

@ -19,7 +19,8 @@
"19": "images/icon-19.png",
"38": "images/icon-38.png"
},
"default_title": "metamask"
"default_title": "MetaMask",
"default_popup": "popup.html"
},
"content_scripts": [
{

24
app/popup.html Normal file
View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Typo Blaster</title>
<style>
body {
min-width: 357px;
overflow-x: hidden;
}
img {
margin: 5px;
border: 2px solid black;
vertical-align: middle;
width: 75px;
height: 75px;
}
</style>
</head>
<body>
<script src="./scripts/popup.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>

View File

@ -4,14 +4,31 @@ const identitiesUrl = 'https://alpha.metamask.io/identities/'
// var unsignedTxs = {}
var zeroClient = ZeroClientProvider({
var zeroClient = new ZeroClientProvider({
rpcUrl: 'https://rawrpc.metamask.io/',
})
// setup badge click handler
chrome.browserAction.onClicked.addListener(function(activeTab) {
chrome.tabs.create({ url: identitiesUrl })
})
// // setup badge click handler
// chrome.browserAction.onClicked.addListener(function(activeTab) {
// // chrome.tabs.create({ url: identitiesUrl })
// tabbernackle()
// })
// function tabbernackle(){
// chrome.tabs.create({
// url: 'about:blank',//chrome.extension.getURL('dialog.html'),
// active: false
// }, function(tab) {
// // After the tab has been created, open a window to inject the tab
// chrome.windows.create({
// tabId: tab.id,
// type: 'panel',
// focused: true
// // incognito, top, left, ...
// });
// });
// }
// setup messaging
chrome.runtime.onConnect.addListener(connectRemote)

1
app/scripts/popup.js Normal file
View File

@ -0,0 +1 @@
document.body.innerHTML = "real talk"