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
setYearInFooter = function() { | |
var date = new Date(); | |
var year = date.getFullYear(); | |
var footerCopyright = document.querySelector('.footer__copyright'); | |
footerCopyright.innerHTML = ('© ' + year + '- Vodafone Libertel B.V.'); | |
}; |
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
// Test variant 1 | |
var bestelButton = document.getElementById('ID').getElementsByClassName('CLASS')[0]; | |
var bestelBlock = document.createElement('p'); | |
var bestelText = document.createTextNode('TEXT'); | |
bestelBlock.appendChild(bestelText); | |
bestelButton.appendChild(bestelBlock); | |
// Test variant 2 | |
var bestelButton = document.getElementById('ID'); |
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
// Parsed user agent | |
var userAgent = UAParser(navigator.useragent); | |
// Browser info | |
var browserName = userAgent.browser.name; | |
var browserVersion = userAgent.browser.major; | |
// OS info | |
var osName = userAgent.os.name; | |
var osVersion = userAgent.os.version; |
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
.block { | |
background: black; | |
width: 500px; | |
height: 100px; | |
margin: 0 auto; | |
text-align: center; | |
&:before { | |
margin-top: 25px; | |
display: inline-block; | |
background: white; |
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
var getLastDayOfMonth = function(){ | |
var date = new Date(); | |
var lastDay = new Array([]); | |
lastDay[0] = "31 januari"; | |
lastDay[1] = "28 februari"; | |
lastDay[2] = "31 maart"; | |
lastDay[3] = "30 april"; | |
lastDay[4] = "31 mei"; | |
lastDay[5] = "30 juni"; | |
lastDay[6] = "31 juli"; |
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
browser-sync start --server --files "*.html, css/*.css" |
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
var today = new Date(); | |
// Month is zero based so April is 3 | |
if (today.getHours() >= 0 && today.getDate() >= 29 && today.getMonth() >= 5 && today.getFullYear() >= 2015) { | |
function getUrlVar(key) { | |
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); | |
return result && unescape(result[1]) || ""; | |
} | |
if (getUrlVar('showsite') != 'true') { | |
window.location = 'https://site.nl'; |
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
$('body').append('<img src="'+pixel+'" height="1" width="1" />'); |
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
// For PNG dropshadows | |
.shadow { | |
filter: drop-shadow(10px 10px 3px rgba(0,0,0,1)); | |
-webkit-filter: drop-shadow(10px 10px 3px rgba(0,0,0,1)); | |
} |