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($){ | |
function inputFocus(){ | |
var input = $(this); | |
if (input.val() === input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
} |
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
// ==================== Existing ========================================= | |
shorten: function(url, callback, reshortenLink) { | |
// ... | |
}, | |
// called | |
Shortener.shorten('site.com/some/url', function(){ | |
// more logic | |
}, 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
var $ = require('jquery'); | |
// I would assume this would work: | |
var DOMPurify = require('dompurify'); | |
try { | |
var firstHTML = DOMPurify.sanitize('<p onclick="alert(10);">First worked</p>'); | |
$('body').append( firstHTML ); | |
} catch (err) { | |
$('body').append( '<p>' + err + '</p>' ); |
NewerOlder