Hello everyone,
I am a complete beginner in developing Acrobat functionalities, and I had been given a task of adding a button to the toolbar, which on pressing would display a pop-up, using Javascript. I was able to add a button to the add-on toolbar and then I manually added the button from the add-on tools to the toolbar. I have been asked if this manual addition could be automated, I went through the Javascript API reference and found that it provides the execMenuItem method but it only is able to perform some commands such as Save As. Could it be possible to write a script that would automate the manual addition ? The manual addition that I am talking about is Going to View -> Show/Hide -> Toolbar Items -> Customize Quick Tools
I am aware that we can add a button to the toolbar directly using plugins but that would require developing in C++, and our team is trying to explore functionalities that could be achieved using JS scripts
Thanks
You can use addToolButton() from page 100 of the JavaScript for Acrobat API Reference to achieve similar functionality.
However it appears that adding to Quick Tools is not supported through the JavaScript API, according to one AcrobatUsers post:
Note that as of version X you cannot place a button on the toolbar automatically, no matter what code you write - it will ALWAYS appear on the Tools Pane, down at the bottom corner - from where the user has to manually drag it into the Quick Tools area.
Related
I have a customer using bing tracking via https://bat.bing.com/bat.js.
On December, 6th 2021 it started calling in clarity.js without the customer making any changes to their code.
This slowed the overall page load by 1 second on mobile and 500ms on desktop. I've been trying to figure out how to disable this JS but I'm not sure what to do as it's being fired from the bing tracking js.
The bing tracking code is being triggered via google tag manager.
Anyone else having this issue and know how to disable clarity.js from being called at all?
Customer is using Wordpress. Amazing Bing can implement code that slows down a site overall page speed without any notification to the customer.
This seems to be added mid-November 2021. Problematic for sure, as it broke our website in certain situations. To disable it, follow these steps:
Go to ui.ads.microsoft.com
In the top bar go to Tools, then under Conversion tracking click on UET tag
In the table at the bottom of the page click on the name of your tag.
Under Enable Microsoft Clarity disable the checkbox and click the Save button.
This should directly remove the script from your website.
I've found the way to turn off Clarity. In Microsoft Advertising, the UET tag has to be re-configured. A checkbox appeared in the UET wizard that allows you to turn off Clarity.
We figured this out by going into our bing web tools and disabling the Clarity integration.
Is there a way to trigger and show the On-Screen-Keyboard in Windows 7/8 when the user clicks onto a text-input (like a form in a normal html page)?
I think that the behaviour is similar of that of mobile-phones or tablets, but i would have a solution for computer desktop.
So, the questions, in detail, are:
1 - It is possible to trigger the native Windows On-Screen-Keyboard, by clicking in an input text or by pressing a button in the web page? I think that i should use javascript/jquery, but i'm not sure...
2 - I found this plugin http://www.sitepoint.com/jquery-screen-keyboard-plugin/ that seems nice, but
a - I did not understand exactly how to install it
b - I also need the option of automatic scan keys of the on-screen-keyboard (in the Windows native on-screen-keyboard this option is present)...is there a possibility to implement this function in the plugin?
Thanks
I don't believe it is possible to trigger the windows on-screen keyboard using JavaScript alone (assuming this is for a web page), you'll need to call upon a different script that operates outside of your browser (e.g. VBScript, etc).
a) this plugin is a tool that you can use in a page you are developing, but can't be used generically for everything; it will only exist in browser pages which you load it to. If you want to include this plugin in a web page you are making, simply save the file in the page's js folder, then reference it in the script block of your HTML as follows: script src="js/jsKeyboard.js"
b) The optional scan keys that is built into the windows keyboard is not part of the jQuery keyboard, but you could program that in as an optional function if you are familiar with JavaScript.
So I decided recently to create a firefox extension I have been thinking about, but do not have any prior experience with it. I read on the official tutorials and figured that the addons sdk seemed to fit me well, but I seem to have hit a hitch using it.
What I want to do is create an options popup dialog, similar to the one you see if you press alt-tools-options. That is, a border with title and close button on the upper part, and a bigger area inside the window where I can define an "intuitive" (default elements with the skin the user is used to) GUI.
The tabs at the top (general, privacy security etc.) is nothing I really need, though would not hurt either.
So the issue is that from my searches, when you use addon sdk, you are not supposed to use XUL which has those elements, but instead you seem to be supposed to create something custom using HTML in a panel. I don't think its possible to create the top-bar akin to the real options-menu when using that, although if I am wrong I would not mind being corrected.
I had a similar issue before, where I wanted a drop-down menu from the toolbar similar to the default ones, which I solved thanks to: How to add a dropdown menu to a firefox addon sdk powered addon toolbar button?.
Might be worth noting that that the button opening the options dialog is one of the menuitems created as described there.
I was considering that it could probably be possible (aka I am not sure) to use something akin to this, but sadly I do not know how I would create a "separate" (drag-able) popup that I could use this on.
If possible, I would prefer there to exist a solution, but if someone knows that it is indeed impossible, please do post that so and I can give up without regrets and just make some sort of custom HTML panel instead :)
tldr:
Is there a way to create a popup dialog similar (in style) to the options window you can open using alt-tools-options in firefox when developing using addon sdk?
Essentially, you aren't supposed to, at least not with the SDK.
But then again, it is still possible, but you need to do a lot of stuff yourself:
You need to register a chrome: package for your add-on, as the resource: URIs the SDK uses internally do not work correctly for XUL windows. Create a Chrome Registration (chrome.manifest file). The SDK supports this since Firefox 24 IIRC.
Create the XUL file. For preferences/options windows, there is already the <prefwindow> binding. Look at other extensions and or the Firefox Options dialog (which is a huge thing with multiple overlays, so better look at other extensions). Place the XUL file in chrome/content/<somefile>.xul. This will then correspond to chrome://<registered_package_from_1>/content/<somefile>.xul.
Implement something that will actually display the window. Normally non-SDK add-ons would just put em:optionsURL into their install.rdf, to have the Add-On Manager automatically create a Preferences button that will open the specified URL, but in the SDK this is generated from package.json and there is no way to put optionsURL in package.json if I'm not mistaken. But you could do other things, like using a simple-prefs type: control button to have a button in your about:addons page, or add it to some browser menu (which would require yet another heap of XUL-modifying, require("chrome") code.). To actually open the dialog, you could use window/utils.openDialog.
Don't forget to close any open windows again when your add-on gets unloaded.
As you can see, not a simple task...
If you're just after preferences in general, consider using simple-prefs.
I need to navigate through a particular website, frequently, to get at some sub-page that is several layers beyond the front page and it is taking too much time to click and scroll and click and scroll to get at the desired final screen where I enter the search string. So, I would like to automate the process by making Javascript trigger the right button events to get me to the distant page where I can enter the search string manually.
So, I know how the code needed to trigger the event,
document.getElementById('x').click();
but how can I implement this inside my browser, since this is not my own website?
If this is going thru different pages, then probably a Web UI automation tool would be the best (like Selenium - http://www.seleniumhq.org).
as #elcarns says, if you need to inject code into another's website, you could do so opening the console (view --> developers --> javascript console in Chrome).
Another, more complex way to do it when you have to traverse several pages is by developing a plugin.
javascript:document.getElementById('x').click(); in the url bar. You can probably make a bookmarklet for it as well.
I'm new to google chrome extensions, but I'm quite familiar with HTML and some javascript. My main area of expertise is Objective-C (but that's a different area).
I wanted to build a chrome extension where I want to replace a website's button with a different custom button (The button uses a specific class/ID). For example if a website were to have a button that said "Tweet Us" I would want to change it to "Email Us", change the onClick action and the button image.
I was wondering if anyone knows of any tutorials or samples that touch on this. Most that I've ran into focus more on building UIs by the bookmark browser, but I don't really have use for that.
Start with reading this.
Add to the manifest.json the URL you want to manipulate under "matches".
Also add to the manifest.json your JavaScript + css (under "content_scripts").
In the JavaScript write some code that deletes the current button and replace it with your button and
your event for that button.
The easiest way to write it is with Jquery.