PageSourceSearch

https://www.alishataylor.com/wp-content/themes/alisha_taylor/smash/js/smash-scripts.js

js alishataylor.com collected 2026-09-29 16:04:47 UTC 2,118 bytes, 78 lines download raw bytes

1almComplete = function(alm){
2    lazyLoad();
3    scaleBgImages();
4}
5
6function copyToClipboard(){
7    /* Get the text field */
8    var copyText = document.getElementById("postURL");
9
10    /* Select the text field */
11    copyText.select();
12    copyText.setSelectionRange(0, 99999); /*For mobile devices*/
13
14    /* Copy the text inside the text field */
15    document.execCommand("copy");
16
17    /* Alert the copied text */
18    alert("Copied the text: " + copyText.value);
19}
20
21function externalLinks(){
22    jQuery(document.links).filter(function() { 
23        return this.hostname != window.location.hostname; 
24    }) .attr('target', '_blank');
25}
26
27/*
28* If using with slick slider add .lazy-slide class to all elements 
29* inside slider that are lazy loaded/resized & do the following before calling 
30* the slick slider:
31*
32    $('.SLIDER').on('afterChange', function(slick, currentSlide){
33        lazyLoad('.lazy-slide');
34    });
35*()
36*/
37function lazyLoad(selector) {
38    jQuery(selector).Lazy({
39        // your configuration goes here
40        scrollDirection: 'vertical',
41        threshold: 100,
42        afterLoad: function(element) {
43            console.log('done');
44            scaleBgImages()
45        },
46        onError: function(element) {
47            console.log('error loading ' + element.data('src'));
48        }
49    });
50}
51
52function scaleBgImages() {
53    var bgs = jQuery('*[data-bgratio]');
54    bgs.each(function(){
55        var _ = jQuery(this);
56        var w = _.width();
57        var r = _.data('bgratio');
58        _.stop().height(w * r);
59        jQuery(window).resize(function(){
60            setTimeout(function(){
61                w = _.stop().width();
62            }, 500);
63            setTimeout(function(){
64                _.stop().height(w * r);
65            },600);
66        });
67        _.addClass('resized');
68    });
69}
70
71function animateScroll() {
72    jQuery(document).ready(function(){
73        jQuery( "a.scrollLink" ).click(function( event ) {
74            event.preventDefault();
75            jQuery("html, body").animate({ scrollTop: jQuery(jQuery(this).attr("href")).offset().top - 150 }, 500);
76        });
77    });
78}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.