start of extension popup window

feature/default_network_editable
kumavis 9 years ago
parent 9f7b00f10a
commit 709d93b5a1
  1. 9
      Gruntfile.js
  2. 3
      app/manifest.json
  3. 24
      app/popup.html
  4. 27
      app/scripts/background.js
  5. 1
      app/scripts/popup.js

@ -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'],
},
},
},

@ -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": [
{

@ -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>

@ -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)

@ -0,0 +1 @@
document.body.innerHTML = "real talk"
Loading…
Cancel
Save