We are using jquery 1.10.1. we always load 1.10.1 before running intuit.ipp.anywhere.js. The issue we face is that both Jquery 1.6 and 1.10.1(ours) are loaded. despite the fact that there is a checking in intuit.ipp.anywhere.js. after investigating we noticed that the condition window.jQuery.fn.jquery < "1.4.2" is not properly executed. e.g: with JQuery 1.7 we didn't face any issue. It seems that the statement is executed as string compare. Below is the concerned code in intuit.ipp.anywhere.js
if(window.jQuery === undefined || window.jQuery.fn.jquery < "1.4.2") {
// minimum version 1.4.2
var script_tag = document.createElement('script');
script_tag.setAttribute("type","text/javascript");
script_tag.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js");
script_tag.onload = function () {
if(window.jQuery) {
intuit.ipp.jQuery = window.jQuery.noConflict(true);
intuit.ipp.anywhere.windowLoad();
}
};
This bug for IE has already been resolved in our previous release.
Please take the latest jquery lib - https://appcenter.intuit.com/Content/IA/intuit.ipp.anywhere.js (if you are loading it locally)
You can also refer-Intuit IPP nuking jQuery in IE
Related
There was a version of Leaf that I was using to load .html files instead of .leaf ones from my Vapor project, which would make syntax coloring for those same files done automatically.
The version of Leaf was 4.0.0-tau.1 and the one for LeafKit was 1.0.0-tau.1.1
When using this particular version, I could setup leaf in the configure.swift file this way:
/// Change the classic .leaf extension to .html for the syntax
/// coloring option of Xcode to work each time the app is being load up.
fileprivate func leaf(_ app: Application) {
if !app.environment.isRelease {
LeafRenderer.Option.caching = .bypass // Another issue from the update
}
let detected = LeafEngine.rootDirectory ?? app.directory.viewsDirectory
LeafEngine.rootDirectory = detected
LeafEngine.sources = .singleSource(
NIOLeafFiles(fileio: app.fileio,
limits: .default,
sandboxDirectory: detected,
viewDirectory: detected,
defaultExtension: "html"))
app.views.use(.leaf)
}
In this code, the LeafRenderer.Option.caching = .bypass and the code used with LeafEngine do not work anymore since having updated Leaf to 4.1.3 and LeafKit to 1.3.1.
How can I successfully make this code work as before with the updated Leaf and LeafKit frameworks?
You can use this Xcode plugin:
https://github.com/OmranK/VaporLeafPlugIn
It adds Vapor Leaf language support to Xcode IDE. Provides syntax highlighting for Leaf tags as well as HTML tags with auto-indentation all together.
At the moment the plugin supports Xcode up to 13.2 beta. Future Xcode versions will require small update (add new DVTPlugInCompatibilityUUID) but it can be easily handled even on already installed plugin.
My dev environment is Vue + Vuex + Quasar, and I'm not using things like Babel or Webpack directly, but they are used by the build chain. I've recently upgraded the Quasar app to V2, which uses the Babel browserslist to target specific capabilities in the transpiring, and have started to see an error preventing my app from running. If I include IE 11, it works as it used to.
My source code has this Vuex getter defined (I've simplified it slightly to show the issue):
const isValidPage = state => (pageId = state.route.params?.page) => state.event?.pages?.[pageId]
The issue can be shown on the Babel REPL. That transpiled version is pretty much what I see in the browser console:
const isValidPage = (state) => (
pageId = (_state$route$params = state.route.params) == null
? void 0
: _state$route$params.page
) => {
var _state$route$params, _state$event, _state$event$pages;
return (_state$event = state.event) == null
? void 0
: (_state$event$pages = _state$event.pages) == null
? void 0
: _state$event$pages[pageId];
};
It throws (in Firefox 79) a "ReferenceError: assignment to undeclared variable _state$route$params" error. In Chrome 86, it fails at the same point with "ReferenceError: _state$route$params is not defined".
Since I know little about Babel directly, I'm not 100% certain whether this code should execute, whether I need some additional Babel configuration, or whether it's a bug. Pasting the transpiled version into the source code does throw ESLint errors saying that _state$route$params is not defined.
So, it turns out this is a bug in Babel 7. The fix is on it's way.
I am using Backpack for Laravel v4.1.10.
After the upgrade from v.4.0 the filter collapse button in small screens stopped working.
On button click my console error is:
TypeError: can't convert n to string
on the following line of bundle.js (line 9920 expanded):
if (!i && o.toggle && /show|hide/.test(n) && (o.toggle = !1), i || (i = new t(this, o), r.data('bs.collapse', i)), 'string' == typeof n)
Other info: php v7.3.9, Laravel v.7.16.1
Apparently it is not a framework bug as it is not existent in the live demo of backpack.
Any feedback to troubleshoot the issue is very welcome.
I fixed the issue by replacing the bundle.js file with the one provided in the official repository of backpack. Maybe it had not been updated at the version upgrade although I cannot fathom a reason for that.
I was using with jquery version 1.8.2
var hasContainerTab = $("#tabs").find("a[href='#container'").length == 1;
I upgraded jquery to 1.12.4. Now that statement is failing saying
unrecognized expression: a[href='#container'
I referred different blogs like (https://github.com/jquery/jquery/issues/2829) around this, but I could not find a fix.
Can any one tell me how to re-write the statement as per the new version?
Your selector is incorrect, since it misses the closing bracket ]. Use:
var hasContainerTab = $("#tabs").find("a[href='#container']").length == 1;
my question is in the subject.
I need to be able to test if my add-on sdk based extension is installed in order to open it programmatically.
How would I do that ?
Basically, I have a JS script checking for the web browser of the user and if my extension is installed, I'd like to redirect to a specific url, which will launch the opening of the extension.
I read that with XUL extension, adding a contentaccessible=yes to any image and testing it onload gives us the answer, but it seems we can't do that with add-on sdk based...
Any idea ?
Thanks anyway for reading me :)
You should look at the docs for the AddonManager:
https://developer.mozilla.org/en-US/docs/Addons/Add-on_Manager/AddonManager
Here is a code snippet that you coulde use to get going:
const { Cu } = require("chrome");
let AddonManager = Cu.import("resource://gre/modules/AddonManager.jsm").AddonManager;
AddonManager.getAddonsByTypes(["extension"], function(addons) {
var addonData = [];
for (let i in addons) {
let cur = addons[i];
addonData.push({
id: cur.id.toString(),
name: cur.name,
});
};
console.log(JSON.stringify(addonData, null, ' '));
});
I've hosted this code on the Add-on Builder as well:
https://builder.addons.mozilla.org/package/44810/latest/
Edit: Builder is EOL and will go offline in a month.