Skip to content

Instantly share code, notes, and snippets.

͏ ͏ xy0

  • ͏ ͏
Block or report user

Report or block xy0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View atmc-demo-previewer.html
<!-- /*
/
/ \_|\ /
/ /
/ A-Train Marketing /
/ /
ATDemo 0.2.3 /
*/ -->
<div class="atdemo-original">
@xy0
xy0 / jQuery-test.js
Created Aug 16, 2018
test for jQuery support
View jQuery-test.js
// test for jQuery
//
if ('undefined' == typeof window.jQuery) {
console.error('~jQuery is required')
} else {
(function($){
$(document).ready( function(){
// jQuery loaded
@xy0
xy0 / ATMC-custom-metabox.php
Last active Aug 17, 2018
ATMC-Custom-Metabox.php
View ATMC-custom-metabox.php
<?php
/*
/
/ ATMC Custom Metabox /
/ /
/ A-Train Marketing /
/ /
Version 0.1.5 /
*/
@xy0
xy0 / WPPlusMinusAccordion.js
Created Jan 17, 2018
Use JS to change + to - in your WP accordions.
View WPPlusMinusAccordion.js
$('.panel-heading').click(function(){
$('#ew-accordian').find('a').each(function(){
$(this).attr('data-before','+');;
});
if( $(this).find('a').attr('aria-expanded') == 'true' ) {
$(this).find('a').attr('data-before','+');
} else {
$(this).find('a').attr('data-before','-');
@xy0
xy0 / WidowWedder.js
Created Oct 31, 2017
Removes Widows (single words on a newline)
View WidowWedder.js
$(document).ready(function() {
widowWedderLauncher();
});
$(window).resize(function() {
widowWedderLauncher();
});
function widowWedderLauncher() {
$('.no-widow, h1, h2, h3, a').each( function(){
widowWedder( $(this) );
@xy0
xy0 / ATDemo.html
Last active Dec 5, 2018
Preview code that is put into single elements without needing a dev enviroment
View ATDemo.html
<!-- /*
/
/ \_|\ /
/ /
/ A-Train Marketing /
/ /
ATDemo 0.2.2 /
*/ -->
<div class="atdemo-original">
@xy0
xy0 / antiWidowMaker.js
Created Oct 20, 2017
Remove text widows - words that wrap by themselves
View antiWidowMaker.js
$(document).ready(function() {
$('.no-widow, h1, h2, h3, a').each( function(){
antiWidowMaker( $(this) );
});
});
$(window).resize(function() {
$('.no-widow, h1, h2, h3, a').each( function(){
antiWidowMaker( $(this) );
});
});
@xy0
xy0 / defaultUScript.js
Last active Oct 4, 2017
User Script Template
View defaultUScript.js
// ==UserScript== .
// @name XY0-defaultUserScript
// @namespace MESH.FYN.XY0.UScript
// @description F
// @include *
// @version 0.1
// @grant none
// ==/UserScript== .
console.log(' \n' ,
@xy0
xy0 / disable-context-menu
Created Jul 27, 2017
disable context menu (right-click) on a webpage
View disable-context-menu
// document can just as easily be an element
document.oncontextmenu = function() {
return false;
};
@xy0
xy0 / slideout-css-only
Created Jul 10, 2017
slideout-css-only
View slideout-css-only
<style type="text/css">
#slideout {
right: 0;
z-index:9001;
}
#slideout_inner {
right: -274px;
background-color:#f4f4f4;
width: 274px;
text-align:center;
You can’t perform that action at this time.