extension now injects button that can trigger a popover

This commit is contained in:
Nils Norman Haukås 2015-09-26 11:43:02 +02:00
parent 3df9364b26
commit 83e9c5ca88
3 changed files with 15 additions and 4 deletions

View file

@ -11,6 +11,10 @@ function updateIcon () {
}
}
chrome.browserAction.onClicked.addListener(updateIcon);
function initBackground () {
chrome.browserAction.onClicked.addListener(updateIcon);
updateIcon();
}
initBackground();
updateIcon();

View file

@ -1 +1,8 @@
console.log('hello world!');
$(document).ready(function () {
console.log('hello world!');
$("body").append('<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And heres some amazing content. Its very engaging. Right?">Click to toggle popover</button>');
$('[data-toggle="popover"]').popover();
});

View file

@ -2,7 +2,6 @@
"name": "Tag you're it",
"description": "Make the meaning clear. This plugin enables semantic tagging of web content.",
"version": "0.7",
"permissions": [""],
"background": {
"persistent": false,
"scripts": ["background.js"]
@ -12,6 +11,7 @@
"css": ["bower_components/bootstrap/dist/css/bootstrap.min.css"],
"js": [
"bower_components/jquery/dist/jquery.min.js",
"bower_components/bootstrap/js/tooltip.js",
"bower_components/bootstrap/dist/js/bootstrap.min.js",
"content_script.js"]
}],