metamorpov/popup.js

14 lines
350 B
JavaScript
Raw Normal View History

2015-02-23 05:17:13 -05:00
2015-02-21 22:00:28 -05:00
document.addEventListener('DOMContentLoaded', function () {
2015-02-23 05:17:13 -05:00
document.getElementById("submit").addEventListener('click', clickHandler);
2015-02-21 22:00:28 -05:00
}); //instead of onclick="clickHandler()" in popup.html
2015-02-27 05:46:57 -05:00
2015-02-21 22:00:28 -05:00
function clickHandler(){
var person = document.getElementById("inputTxt").value;
chrome.storage.local.set({"person": person}, chrome.tabs.reload());
}