This file contains 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
[ | |
'facebookexternalhit', | |
'Facebot', | |
'Twitterbot', | |
'WhatsApp', | |
'Pinterest', | |
'TelegramBot', | |
'Google Web Preview', | |
'FeedFetcher-Google', | |
'linkedinbot', |
This file contains 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
[ | |
{ | |
"uid": "keywordSELECT", | |
"subtext": "[FQL keyword]", | |
"text": "SELECT" | |
}, | |
{ | |
"uid": "keywordFROM", | |
"subtext": "[FQL keyword]", | |
"text": "FROM" |
This file contains 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
import { createElement } from '@vue/composition-api' | |
import htm from 'htm' | |
const acceptValue = ['input', 'textarea', 'option', 'select'] | |
function getVNodeData (tag, attrs) { | |
const data = {} | |
const basics = ['slot', 'key', 'ref', 'refInFor', 'class', 'style'] |
This file contains 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
const components = { | |
'*': 'strong', | |
'_': 'em', | |
'~': 's', | |
'```': 'code' | |
} | |
export default { | |
functional: true, | |
props: { |
This file contains 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 KonamiCodeMixin (callback) { | |
const KEYS = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'KeyB', 'KeyA'] | |
let i = 0 | |
return { | |
mounted () { | |
window.addEventListener('keyup', this.onKeyUp) | |
}, | |
destroyed () { | |
window.removeEventListener('keyup', this.onKeyUp) |
This file contains 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
[ | |
[ | |
"gbdmg", | |
[ | |
[ | |
42, | |
69, | |
59 | |
], | |
[ |
This file contains 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
module.exports = { | |
name: 'StarRating', | |
functional: true, | |
props: { | |
stars: { | |
type: Number, | |
default: 0 | |
}, | |
tag: { | |
type: String, |
This file contains 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
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<label for="uploadFile">UPLOAD</label> | |
<input type="file" id="uploadFile"/> | |
<script> | |
$("input[type='file']").on("keyup", function(e) { | |
if (e.keyCode === 27) this.blur(), e.stopPropagation(); | |
}); | |
$(document).on("keyup", function(e) { |
This file contains 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() { | |
let props = $$('*') | |
.filter(x => Object.keys(x.dataset).length) | |
.reduce((o,x) => { | |
Object.keys(x.dataset).forEach(key => { | |
o[key] = key.replace(/[A-Z]/g, y => '-' + y.toLowerCase()); | |
}); | |
return o; | |
}, {}); |
This file contains 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
// deparam | |
// | |
// Inverse of $.param() | |
// | |
// Taken from jquery-bbq by Ben Alman | |
// https://github.com/cowboy/jquery-bbq/blob/master/jquery.ba-bbq.js | |
var isArray = Array.isArray || function(obj) { | |
return Object.prototype.toString.call(obj) == '[object Array]'; | |
}; |
NewerOlder