View fastclick-mobile-only.js
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> | |
if (window.innerwidth < 900) { | |
document.write('<script type="text/javascript" src="https://domain.com/wp-content/plugins/perfmatters/vendor/fastclick/fastclick.min.js"><\/script>'); | |
} | |
</script> | |
<script> | |
if(window.innerWidth < 900) { | |
if('addEventListener' in document) { | |
document.addEventListener('DOMContentLoaded', function() { |
View lazy-render.css
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
.nameofdiv { | |
content-visibility: auto; | |
contain-intrinsic-size: 0 1000px; | |
} | |
/* References: | |
https://web.dev/content-visibility/ | |
https://segmentfault.com/a/1190000041980427/en | |
https://clubmate.fi/content-visibility-auto | |
https://dev.to/dailydevtips1/i-made-my-website-28ms-faster-with-content-visibility-466e |
View obsidian-custom-css.css
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
/* preview-mode paragraphs */ | |
p{ | |
padding-top: 6px; | |
padding-bottom: 6px; | |
line-height: 1.6; | |
} | |
/* preview-mode lists */ | |
li{ | |
padding-top: 6px; |
View line-breaks-fluent-forms.php
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
add_filter('fluentform_response_render_textarea', function ($value, $field, $formId, $isHtml) { | |
if (false != strpos($value, '<br />')) { | |
$value = str_replace('<br />', '', $value); | |
} | |
return '<span style="white-space: pre-line">' . $value . '</span>'; | |
}, 15, 4); |
View ninja-forms-perfmatters-delay-js-exclusions.php
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
add_filter('perfmatters_delay_js_exclusions', function($exclusions) { | |
if(is_page(275)) { | |
$exclusions[] = 'underscore.min.js'; | |
$exclusions[] = 'backbone.min.js'; | |
$exclusions[] = 'front-end-deps.js'; | |
$exclusions[] = 'front-end.js'; | |
$exclusions[] = 'nf-'; | |
$exclusions[] = 'jquery.min.js'; | |
$exclusions[] = 'nfForms'; | |
} |
View mobile-cache-buckets.php
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
add_action('wp_footer', function() { | |
if(!wp_is_mobile()) { | |
echo 'hello world'; | |
} | |
}); |
View fastclick-delay-js-workaround.js
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 src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/0.6.0/fastclick.min.js" integrity="sha512-oljyd1wg75alHReTpDvNIQ4Yj1wZwGxxZhJhId3vr2dKY+26/r/wmMrImwDgin03+7wxyhX+adOQB/2BTvO5tQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | |
<script> | |
if ('addEventListener' in document) { | |
document.addEventListener('DOMContentLoaded', function() { | |
FastClick.attach(document.body); | |
}, false); | |
} | |
</script> |
View remove-query-strings-wordpress.php
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
/* Remove Query Strings | |
/***********************************************************************/ | |
add_action('init', 'remove_query_strings'); | |
function remove_query_strings() { | |
if(!is_admin()) { | |
add_filter('script_loader_src', 'remove_query_strings_split', 15); | |
add_filter('style_loader_src', 'remove_query_strings_split', 15); | |
} | |
} | |
function remove_query_strings_split($src) { |
NewerOlder