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
var Events = (function() { | |
// Backbone.js 0.9.10 | |
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://backbonejs.org | |
// Create a local reference to array methods. | |
var array = []; |
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
<!-- 微信分享抓取专用 --> | |
<img id="weixin-share-icon" style="position: absolute; z-index: -222; width: 0; height: 0;" src="{{ STATIC_URL }}images/lime/share-default.jpg" /> |
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>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script> |
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
There is one way to play the video/audio file automatically on 4.2.1. Create an iframe and set its source to the media file's URL and append the iframe to the body. It'll be autoplay. | |
var ifr=document.createElement("iframe"); | |
ifr.setAttribute('src', "http://mysite.com/myvideo.mp4"); | |
ifr.setAttribute('width', '1px'); | |
ifr.setAttribute('height', '1px'); | |
ifr.setAttribute('scrolling', 'no'); | |
ifr.style.border="0px"; | |
document.body.appendChild(ifr); |
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
.site__title { | |
color: #f35626; | |
background-image: -webkit-linear-gradient(92deg,#f35626,#feab3a); | |
-webkit-background-clip: text; | |
-webkit-text-fill-color: transparent; | |
-webkit-animation: hue 60s infinite linear; | |
} | |
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
// @return [float] a random number between min and max | |
function getRandom(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
// @return [integer] a random int between min and max | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} |
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
grunt.registerMultiTask('auto_create_ts', 'The best Grunt plugin ever.', function() { | |
function replaceAssets(fileSrc) { | |
//read page file data | |
var htmlData = grunt.file.read(fileSrc); | |
//get the full asset text, like "text/javascript" src="js/hello.js?auto_create_ts=3232323233" | |
// console.log(/(".*?auto_create_ts=)(\d+)([\"|\'])/g.test(htmlData)); | |
var newdata = htmlData.replace(/(".*?auto_create_ts=)(\d+)([\"|\'])/g, "$1" + (Math.round(+new Date() / 1000)) + "$3"); |
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
Show hidden characters
[ | |
{ | |
"args": { | |
"setting": "tab_size", | |
"value": 4 | |
}, | |
"command": "set_setting" | |
}, | |
{ | |
"args": |
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
/** | |
* Shortcut for adding animation class name to dom element | |
* @param {string} cls class name | |
* @param {Function} cb callback | |
* @param {Function} lastItemCb callback execute at last elment animated | |
* @return {object} this | |
*/ | |
$.fn.classAnimoEnd = function(cls, cb, lastItemCb) { | |
var el = this; |
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
<?php | |
// Pre-2.6 compatibility | |
if( !defined('WP_CONTENT_URL') ) | |
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); | |
if( !defined('WP_CONTENT_DIR') ) | |
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); |