Skip to content

Instantly share code, notes, and snippets.

View WebDevBooster's full-sized avatar

Alex Booster WebDevBooster

View GitHub Profile
@WebDevBooster
WebDevBooster / background.js
Created December 17, 2017 23:55 — forked from ramsaylanier/background.js
Setup Page Action on Certain URLS
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: [
@WebDevBooster
WebDevBooster / scroll.js
Last active February 3, 2018 10:23 — forked from planetoftheweb/scroll.js
Smooth scrolling effect, can be used for Bootstrap 4 navigation. Requires a full version of jQuery in order for this to work. (jquery.slim is insufficient)
$(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) +']');

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3