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
// Configure new account/profile/environment details | |
var newAccount = "ianhampton"; | |
var newProfile = "demo"; | |
var newEnvironment = "prod"; | |
try { | |
// Dynamically update environment | |
newEnvironment = document.querySelector('script[src*="tiqcdn.com"]').src.toString().split('/')[6]; | |
} catch(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
// ==UserScript== | |
// @name Contract Hire and Leasing Calculator | |
// @namespace http://rorymccrossan.co.uk | |
// @version 1.0 | |
// @description Adds helpful information to each deal | |
// @author Rory McCrossan | |
// @match *://www.contracthireandleasing.com/personal/* | |
// @match *://www.contracthireandleasing.com/business/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Always open Web Companion | |
// @namespace http://tealium.com/ | |
// @version 0.1 | |
// @description Always open WC if Tealium is running | |
// @author Ian Hampton | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Fix Pistonheads Images | |
// @version 1.0 | |
// @description Fixes insecure images on Pistonheads | |
// @match *://*.pistonheads.com/* | |
// @author Ian Hampton | |
// @copyright 2017 | |
// ==/UserScript== | |
(function() { |
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 | |
/* Dynamically add file attachments to Contact Form 7 emails from a Wordpress custom field. | |
* Custom field is 'case-pdf' in the example. | |
*/ | |
add_action('wpcf7_before_send_mail', 'wpcf7_add_attachment'); | |
function wpcf7_add_attachment($contact_form) { | |
global $_POST; | |
$submission = WPCF7_Submission::get_instance(); |