This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getWindowWidth2() { | |
return window.innerWidth || document.body.clientWidth; | |
} | |
$(window).resize(function(){ | |
myMatchHeight('.sameHeight1'); // first group of things I want the same height | |
myMatchHeight('.sameHeight2'); // second group of things I want the same height | |
}); | |
$(window).load(function(){ | |
myMatchHeight('.sameHeight1'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: https://jonsuh.com/blog/better-scroll-to-anchor-links/ | |
$(".anchorLink").click(function(e){ | |
e.preventDefault(); | |
var this_offset = $(this).offset(); | |
var that_id = $(this).attr("href"); | |
var that_offset = $(that_id).offset(); | |
var offset_diff = Math.abs(that_offset.top - this_offset.top); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Windows image file caches | |
Thumbs.db | |
ehthumbs.db | |
# Folder config file | |
Desktop.ini | |
# Recycle Bin used on file shares | |
$RECYCLE.BIN/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.img-svg { width:100%; height: auto; } | |
<img class="img-svg" src="box.svg" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* .invalid class prevents CSS from automatically applying */ | |
.invalid input:required:invalid { | |
background: #BE4C54; | |
} | |
.invalid textarea:required:invalid { | |
background: #BE4C54; | |
} | |
.invalid select:required:invalid { | |
background: #BE4C54; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFormatCurrency(num, options) { | |
// Defaults to showing cents with normal rounding on the cent. | |
// myFormatCurrency(1000.021) -> "$1,000.02" | |
// options = 1 Don't show the cents | |
// myFormatCurrency(1000.021, 1) -> "$1,000" | |
// options = 2 Show the cents with cent rounding up the next whole cent | |
// myFormatCurrency(1000.021, 2) -> "$1,000.03" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParameterByName(name, url) { | |
if (!url) url = window.location.href; | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); | |
if (!results) return null; | |
if (!results[2]) return ''; | |
return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil | |
// https://stackoverflow.com/questions/42109818/reliable-js-rounding-numbers-with-tofixed2-of-a-3-decimal-number | |
// Closure | |
(function() { | |
/** | |
* Decimal adjustment of a number. | |
* | |
* @param {String} type The type of adjustment. | |
* @param {Number} value The number. | |
* @param {Integer} exp The exponent (the 10 logarithm of the adjustment base). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function () { | |
const targetNode = document.body; | |
const callback = function (mutationsList) { | |
for (let mutation of mutationsList) { | |
if (mutation.type == 'childList') { | |
mutation.addedNodes.forEach((node) => { | |
if (node && node.src && node.src.match(/.*pages02.net.*/).length > | |
0) { | |
observer.disconnect(); | |
node.setAttribute("aria-hidden", true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from(document.querySelectorAll(".HTMLCS-issue-detail-list li")).map((el) => { return { detail: el.querySelector(".HTMLCS-issue-title").textContent, code: el.querySelector(".HTMLCS-issue-source-inner strong").textContent } }) |