how to retrieve data from chrome extension storage and populate in form input using javascript -
i had stored data chrome storage want populate data in form input clicking submit button , form has no linked between chrome extension assume form third party how can populate data ideas.
suppose had 1 form of 1 text box , submit button clicking on submit button how textbox filled of data stored in chrome.
here script of chrome extension:
window.onload = function() { document.getelementbyid('save').onclick = function() { var value = document.getelementbyid('saveline').value; chrome.storage.sync.set({ 'myline': value }, function() { alert('success'); }); }; document.getelementbyid('get').onclick = function() { chrome.storage.sync.get('myline', function(data) { alert(data.myline); }); } }
Comments
Post a Comment