Skip to content

Instantly share code, notes, and snippets.

View colleowino's full-sized avatar
🤹
Jest all the things

Cliff Owino colleowino

🤹
Jest all the things
View GitHub Profile
@colleowino
colleowino / browser-dom-man.js
Created November 14, 2017 01:47
Creating Dom element and adding it to the document
document.addEventListener('DOMContentLoaded', function() {
var checkPageButton = document.getElementById('checkPage');
checkPageButton.addEventListener('click', function() {
chrome.tabs.getSelected(null, function(tab) {
d = document;
var f = d.createElement('form');
f.action = 'http://gtmetrix.com/analyze.html?bm';
f.method = 'post';