Skip to content

Instantly share code, notes, and snippets.

@guidoschmidt
guidoschmidt / colorlog.js
Last active September 21, 2017 00:01
Javascript colored console.log
// -- You can use %c to CSS style your output
console.log('%cPrint styled text to the console!', 'font-size: 50px; background: red;');
// -- Use table() function to layout more complex data
const persons = [
{ name: 'Paul',
city: 'Heidelberg',
age: 35,
job: 'Photographer'
},
@josephabrahams
josephabrahams / socialSharePopups.js
Last active November 29, 2021 19:39
Facebook & Twitter Share Popup Windows
(function($) {
$('.js-share-twitter-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Twitter", "height=285,width=550,resizable=1");
});
$('.js-share-facebook-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Facebook", "height=269,width=550,resizable=1");