Legend:
- ✏️ method changes
this
. - 🔒 method does not change
this
.
Array<T>.prototype.*
:
concat(...items: Array): T[]
🔒 ES3
//Use smooth scrolling when clicking on navigation | |
$('.navbar a').click(function() { | |
if (location.pathname.replace(/^\//,'') === | |
this.pathname.replace(/^\//,'') && | |
location.hostname === this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top-topoffset+2 |
chrome.runtime.onInstalled.addListener(function() { | |
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { | |
chrome.declarativeContent.onPageChanged.addRules([ | |
{ | |
conditions: [ | |
new chrome.declarativeContent.PageStateMatcher({ | |
pageUrl: { urlContains: 'slides.com' }, | |
}) | |
], | |
actions: [ |
$(function() { | |
var topoffset = 70; //variable for menu height | |
//Use smooth scrolling when clicking on navigation | |
$('.navbar-nav a').click(function() { | |
if (location.pathname.replace(/^\//,'') === | |
this.pathname.replace(/^\//,'') && | |
location.hostname === this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); |