Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #311971

    Hi Enfold Support

    I have this script that is loaded in my footer

    <script type=’text/javascript’ src=’http://www.codecreative.uk/wp-content/themes/enfold/js/avia.js?ver=2′></script&gt;

    I would like to some how isolate it from my other script that it conflicts with. Or even de register the script?

    Can you advise how I can do this. And what its purpose is?

    #312075

    Hey codecreative!

    Thank you for using Enfold.

    I’m afraid it’s not a good idea to disable avia.js because it holds most of the theme script like lightbox, responsive menu, header etc. Do you mind if we take a look at the website? What script conflict are you currently having?

    Best regards,
    Ismael

    #312190

    Hi Ismael

    Okay no problem. The website is
    http://www.codecreative.uk/

    The script of mine is
    <script type=’text/javascript’ src=’http://www.codecreative.uk/wp-content/themes/enfold-child/scripts/script.js?ver=1.0.0′></script&gt;

    This script file allows the hanging computer monitors you can see under the navigation bar to move left and right dependent on user mouse movement.

    If I de register the file avia.js it still fails to work.

    But if I ftp into my account and simply rename the file from avia.js to avia.js.old then everything works fine. When the avia.js file is included it prevents this nice effect from happening. The screens actually go smaller and distorted. Is there a way to possibly combine the 2 files together?

    If you require ftp access let me know

    #312690

    Hey!

    I’m sorry but we won’t be able to provide support for third party scripts as stated on our support policy. Your best bet is to contact the script author. Maybe he can shed some light on why the script is not working.

    Best regards,
    Ismael

    #313978

    Hi

    As a test to debug I actually deleted avia.js and it works fine. So then I uploaded avia.js but with no data in it, so essentially a blank file. And it caused the problem. So this tells me there is no issue with the code in avia.js but possibly this could be an issue with the file name itself?

    If I change the file name of avia.js will it matter to its functionality?

    #314030

    Hi in the file avia.js could you tell me what the lines of code running from 1590 – 1625 at the bottom of the file are used for?

    I’m thinking of removing them from the file as it’s causing problems with my own script. The js in avia that I want to remove is

    /*
    * jQuery Browser Plugin 0.0.6
    * https://github.com/gabceb/jquery-browser-plugin
    *
    * Original jquery-browser code Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
    * http://jquery.org/license
    *
    * Modifications Copyright 2014 Gabriel Cebrian
    * https://github.com/gabceb
    *
    * Released under the MIT license
    */!function(a,b){“use strict”;var c,d;if(a.uaMatch=function(a){a=a.toLowerCase();var b=/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf(“trident”)>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf(“compatible”)<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(iphone)/.exec(a)||/(android)/.exec(a)||/(windows phone)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||/(cros)/i.exec(a)||[];return{browser:b[3]||b[1]||””,version:b[2]||”0″,platform:c[0]||””}},c=a.uaMatch(b.navigator.userAgent),d={},c.browser&&(d[c.browser]=!0,d.version=c.version,d.versionNumber=parseInt(c.version)),c.platform&&(d[c.platform]=!0),(d.android||d.ipad||d.iphone||d[“windows phone”])&&(d.mobile=!0),(d.cros||d.mac||d.linux||d.win)&&(d.desktop=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv){var e=”msie”;c.browser=e,d[e]=!0}if(d.opr){var f=”opera”;c.browser=f,d[f]=!0}if(d.safari&&d.android){var g=”android”;c.browser=g,d[g]=!0}d.name=c.browser,d.platform=c.platform,a.browser=d}(jQuery,window);

    /*Vimeo Frogaloop API for videos*/
    var Froogaloop=function(){function e(a){return new e.fn.init(a)}function h(a,c,b){if(!b.contentWindow.postMessage)return!1;var f=b.getAttribute(“src”).split(“?”)[0],a=JSON.stringify({method:a,value:c});”//”===f.substr(0,2)&&(f=window.location.protocol+f);b.contentWindow.postMessage(a,f)}function j(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(f){}”ready”==b&&!i&&(i=!0);if(a.origin!=k)return!1;var a=c.value,e=c.data,g=””===g?null:c.player_id;c=g?d[g][b]:d[b];b=[];if(!c)return!1;void 0!==
    a&&b.push(a);e&&b.push(e);g&&b.push(g);return 0<b.length?c.apply(null,b):c.call()}function l(a,c,b){b?(d[b]||(d[b]={}),d[b][a]=c):d[a]=c}var d={},i=!1,k=””;e.fn=e.prototype={element:null,init:function(a){“string”===typeof a&&(a=document.getElementById(a));this.element=a;a=this.element.getAttribute(“src”);”//”===a.substr(0,2)&&(a=window.location.protocol+a);for(var a=a.split(“/”),c=””,b=0,f=a.length;b<f;b++){if(3>b)c+=a[b];else break;2>b&&(c+=”/”)}k=c;return this},api:function(a,c){if(!this.element||
    !a)return!1;var b=this.element,f=””!==b.id?b.id:null,d=!c||!c.constructor||!c.call||!c.apply?c:null,e=c&&c.constructor&&c.call&&c.apply?c:null;e&&l(a,e,f);h(a,d,b);return this},addEvent:function(a,c){if(!this.element)return!1;var b=this.element,d=””!==b.id?b.id:null;l(a,c,d);”ready”!=a?h(“addEventListener”,a,b):”ready”==a&&i&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b;a:{if((b=””!==c.id?c.id:null)&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=
    !1;break a}d[a]=null}b=!0}”ready”!=a&&b&&h(“removeEventListener”,a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener(“message”,j,!1):window.attachEvent(“onmessage”,j);return window.Froogaloop=window.$f=e}();

    // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
    // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel. can be removed if IE9 is no longer supported or all parallax scripts are gone MIT license
    (function(){var lastTime=0;var vendors=[‘ms’,’moz’,’webkit’,’o’];for(var x=0;x<vendors.length&&!window.requestAnimationFrame;++x){window.requestAnimationFrame=window[vendors[x]+’RequestAnimationFrame’];window.cancelAnimationFrame=window[vendors[x]+’CancelAnimationFrame’]||window[vendors[x]+’CancelRequestAnimationFrame’]}if(!window.requestAnimationFrame)window.requestAnimationFrame=function(callback,element){var currTime=new Date().getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){callback(currTime+timeToCall)},timeToCall);lastTime=currTime+timeToCall;return id};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=function(id){clearTimeout(id)}}());

    jQuery.expr[‘:’].regex = function(elem, index, match) {
    var matchParams = match[3].split(‘,’),
    validLabels = /^(data|css):/,
    attr = {
    method: matchParams[0].match(validLabels) ?
    matchParams[0].split(‘:’)[0] : ‘attr’,
    property: matchParams.shift().replace(validLabels,”)
    },
    regexFlags = ‘ig’,
    regex = new RegExp(matchParams.join(”).replace(/^\s+|\s+$/g,”), regexFlags);
    return regex.test(jQuery(elem)[attr.method](attr.property));
    }

    #314031

    Sorry infact it is just this 1 line of js to be commented out from avia.js line 1601

    //!function(a,b){“use strict”;var c,d;if(a.uaMatch=function(a){a=a.toLowerCase();var b=/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf(“trident”)>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf(“compatible”)<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(iphone)/.exec(a)||/(android)/.exec(a)||/(windows phone)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||/(cros)/i.exec(a)||[];return{browser:b[3]||b[1]||””,version:b[2]||”0″,platform:c[0]||””}},c=a.uaMatch(b.navigator.userAgent),d={},c.browser&&(d[c.browser]=!0,d.version=c.version,d.versionNumber=parseInt(c.version)),c.platform&&(d[c.platform]=!0),(d.android||d.ipad||d.iphone||d[“windows phone”])&&(d.mobile=!0),(d.cros||d.mac||d.linux||d.win)&&(d.desktop=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv){var e=”msie”;c.browser=e,d[e]=!0}if(d.opr){var f=”opera”;c.browser=f,d[f]=!0}if(d.safari&&d.android){var g=”android”;c.browser=g,d[g]=!0}d.name=c.browser,d.platform=c.platform,a.browser=d}(jQuery,window);

    #314294

    Hi!

    Did you fix the issue with that modification? can we close this thread?

    Regards,
    Josue

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.