Skip to content

Instantly share code, notes, and snippets.

View kylewest's full-sized avatar

Kyle West kylewest

View GitHub Profile
@kylewest
kylewest / custom-message-on-page-by-url.html
Created December 21, 2016 16:39
displays a custom message when url matches the regex in code.
<!-- put this code in custom html <head> section (Website Configuration) -->
<script type="text/javascript">
$(document).ready(function(){
if ( /b\-11854/i.test(window.location.href ) ) {
$("#allbrands").before("<div style='background:#FFF;text-align:center'><h2>We can get any Mazda parts.</h2><h2>Please <a href='/contact'>CONTACT US</a> if you don't see the parts that you need.</h2></div>");
}
});
</script>
<!-- put this code in custom html <head> section (Website Configuration) -->
<script type="text/javascript">
$(document).ready(function(){
if ( /magnaflow/i.test($("h1").text()) ) {
$("#ctl00_MainContentPlaceHolder_YourPriceLabel").after("<br/>Use Coupon: MAGNAFLOW for an extra 5% off");
}
if ( /aeromotive/i.test($("h1").text()) ) {
$("#ctl00_MainContentPlaceHolder_YourPriceLabel").after("<br/>Use Coupon: AEROMOTIVE for an extra 5% off");
}
});

Major Improvements

  • Complete redesign of application.
  • Improved usability and performance of almost everything.
  • New autocompletes for featured products and coupons.
  • New HTML editors for homepage and content pages.
  • New code editors for custom header/footer/sidebar/stylesheet.

Renamed

@kylewest
kylewest / ga-events-add-to-cart.html
Last active July 19, 2016 18:40
fire google analytics event when user clicks add to cart
<script type="text/javascript">
$(document).ready(function(){
$(".addtocartbutton").click(function() {
// GA events.js code here
ga('send', 'event', 'Videos', 'play', 'Fall Campaign');
});
});
</script>
{
"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
/*-------------------------------------------------------------------
Layout
===================================================================*/
#masterwrapper
/*Wraps the wrapper with 16px to each side*/ {
margin: 0;
width: 100%;
}
<div class="column mcb-column one column_map ">
<script>
function google_maps_56c792bbd2c7a() {
var latlng = new google.maps.LatLng(42.24, -83.44);
var draggable = true;
var myOptions = {
zoom: 6,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: [{
<?xml version="1.0" encoding="utf-8"?>
<AdminDeploymentCustomizations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/wix/2011/AdminDeployment">
<BundleCustomizations TargetDir="C:\Program Files (x86)\Microsoft Visual Studio 14.0" NoCacheOnlyMode="default" NoWeb="default" NoRefresh="default" SuppressRefreshPrompt="default" Feed="default" />
<SelectableItemCustomizations>
<SelectableItemCustomization Id="TypeScriptV6" Selected="yes" FriendlyName="TypeScript 1.7.6.0 for Visual Studio 2015 Update 1" />
<SelectableItemCustomization Id="VSUV1" Hidden="no" Selected="yes" FriendlyName="Visual Studio 2015 Update 1" />
<SelectableItemCustomization Id="VSUV1PreReqV1" Selected="yes" FriendlyName="Visual Studio 2015 Update 1 Prerequisite" />
<SelectableItemCustomization Id="MicroUpdateV1.2" Selected="yes" FriendlyName="Update for Microsoft Visual Studio 2015 (KB3110221)" />
<SelectableItemCustomization Id="WebTo
@kylewest
kylewest / private.xml
Last active September 10, 2015 17:26
<?xml version="1.0"?>
<root>
<appdef>
<appname>JUMP_DESKTOP</appname>
<equal>com.p5sys.jump.mac.viewer.web</equal>
</appdef>
<windownamedef>
<name>Jump_Desktop</name>
<regex>Jump Desktop|Preferences</regex>
</windownamedef>