The name is pretty self-explanatory, visit my blog post describing this converter here or see the live demo
legierski / bookmarklet-to-extension Goto Github PK
View Code? Open in Web Editor NEWBookmarklet to Chrome Extension
Bookmarklet to Chrome Extension
The name is pretty self-explanatory, visit my blog post describing this converter here or see the live demo
I can't unzip the non-icon files....
Here is my bookmarklet code:
javascript:var form=$("iframe").filter(function(){return $(this).css("visibility")=="visible"})[0].contentWindow;try{form.Mscrm.InlineEditDataService.get_dataService().validateAndFireSaveEvents=function(){return new Mscrm.SaveResponse(5,"")}}catch(e){}var attrs=form.Xrm.Page.data.entity.attributes.get();for(var i in attrs){attrs[i].setRequiredLevel("none")}var contrs=form.Xrm.Page.ui.controls.get();for(var i in contrs){try{contrs[i].setVisible(true);contrs[i].setDisabled(false);contrs[i].clearNotification()}catch(e){}}var tabs=form.Xrm.Page.ui.tabs.get();for(var i in tabs){tabs[i].setVisible(true);tabs[i].setDisplayState("expanded");var sects=tabs[i].sections.get();for(var i in sects){sects[i].setVisible(true)}}
When executing as a Bookmarklet, the $("iframe") returns a jQuery object, and everything runs as expected. When running as an extension, it returns the iFrame itself, not the jQuery object, resulting in the filter function not being defined, and throwing an exception.
Any ideas as to how to resolve the issue?
From debug console:
Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
Following the twisty maze of update links, https://groups.google.com/u/0/a/chromium.org/g/chromium-extensions/c/zQ77HkGmK9E says it's been pushed off again until at least March 2023, but that's pretty soon; given what's written there it'll probably get pushed off further though.
(That said, it looks like just changing 2
to 3
in the output is sufficient, but if I actually knew anything about extension manifests I wouldn't actually be using this :-)
A nice bonus would be the ability to have a keyboard shortcut for the bookmarklet also.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.