Skip to content

Instantly share code, notes, and snippets.

View Pseric's full-sized avatar
💭
I may be slow to respond.

Pseric Pseric

💭
I may be slow to respond.
View GitHub Profile
<div data-video="VIDEO_ID"
data-autoplay="0"
data-loop="1"
id="youtube-audio">
</div>
<script src="https://www.youtube.com/iframe_api"></script>
<script src="https://cdn.rawgit.com/labnol/files/master/yt.js"></script>
function crunchify_gravatar_alt( $crunchifyGravatar ) {
if ( have_comments() ) {
$alt = get_comment_author();
}
else {
$alt = get_the_author_meta( 'display_name' );
}
$crunchifyGravatar = str_replace( 'alt=\'\'', 'alt=\'Avatar for ' . $alt . '\' title=\'Gravatar for ' . $alt . '\'', $crunchifyGravatar );
return $crunchifyGravatar;
}
<script>
function loadAPI() {
var js = document.createElement('script');
js.src = '//connect.facebook.net/zh_TW/sdk.js#xfbml=1&appId=YOUR_APP_ID&version=v3.2';
document.body.appendChild(js);
}
window.onscroll = function () {
var rect = document.getElementById('comments').getBoundingClientRect();
if (rect.top < window.innerHeight) {
<meta property="fb:admins" content="YOUR_FACEBOOK_USER_ID" />
<meta property="fb:app_id" content="YOUR_APP_ID" />
<style>
html {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
_filter: none;
}
</style>
html {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
_filter: none;
}
<script type='text/javascript' src='https://c0.wp.com/c/4.9.8/wp-includes/js/jquery/jquery.js'></script>
<script type='text/javascript' src='https://c0.wp.com/c/4.9.8/wp-includes/js/jquery/jquery-migrate.min.js'></script>
<link rel='stylesheet' id='jetpack_css-css' href='https://c0.wp.com/p/jetpack/6.6.1/css/jetpack.css' type='text/css' media='all' />
<link rel='stylesheet' id='dashicons-css' href='https://c0.wp.com/c/4.9.8/wp-includes/css/dashicons.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='admin-bar-css' href='https://c0.wp.com/c/4.9.8/wp-includes/css/admin-bar.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='genericons-css' href='https://c0.wp.com/p/jetpack/6.6.1/_inc/genericons/genericons/genericons.css' type='text/css' media='all' />
<link rel='stylesheet' id='twentysixteen-jetpack-css' href='https://c0.wp.com/p/jetpack/6.6.1/modules/theme-tools/compat/twentysixteen.css' type='text/css' media='all' />
@Pseric
Pseric / facebook-customer-chat-plugin.htm
Created November 30, 2017 04:31
Facebook Customer Chat Plugin
<div class="fb-customerchat"
page_id="<PAGE_ID>"
ref="<OPTIONAL_WEBHOOK_PARAM>"
minimized="<true|false>">
</div>
@Pseric
Pseric / Facebook-SDK.htm
Created November 30, 2017 04:27
Facebook JavaScript SDK
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
autoLogAppEvents : true,
xfbml : true,
version : 'v2.11'
});
};
@Pseric
Pseric / index.js
Created November 10, 2016 08:07 — forked from fkztw/index.js
佛祖保佑 永無 BUG (May Budda bless you no bug forever)
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \