Skip to content

Instantly share code, notes, and snippets.

View pushpinderbagga's full-sized avatar

Pushpinder Bagga pushpinderbagga

View GitHub Profile
@pushpinderbagga
pushpinderbagga / 0_reuse_code.js
Created June 8, 2016 04:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pushpinderbagga
pushpinderbagga / browserbackbutton.js
Last active April 29, 2016 04:09
Detect Browser Back Button using Javascript
window.onload = function () {
if (typeof history.pushState === "function") {
history.pushState("state", null, null);
window.onpopstate = function () {
history.pushState('newstate', null, null);
//Browser Back Button Pressed - Put your logic here onwards.
};
}
}