Firefox add-on Action Button has no icon - firefox-addon-sdk

I added this code to my Add-on SDK extension in the index.js:
var button = ActionButton({
id: "my-button",
label: "my button",
icon: {
"16": "./us16.png",
"32": "./us32.png"
},
onClick: firstClick
});
The Action Button gets added just fine and works, but there is no icon showing. I put the two icon files in the root folder of my add-on. Should I have put them elsewhere?
(Button documentation.)

Yes. Put your icons in data folder, whilst leaving the paths in the code as they are now.

I have same problem. And solution is add this code to packet.json
"permissions": {"private-browsing": true}
see here Firefox SDK Sample Add On Exported XPI Action Button Doesn't Show Up

Related

Flutter: Load FontAwesome icon based on api

Getting api response like this
"sample_response":
{
"id": 1,
"icon": "fa-ambulance",
}
for static icon i used
icon: FaIcon(FontAwesomeIcons.gamepad),
How to load icon based on the json response
This is not supported by Font Awesome Flutter.
There is another package to help you with that: Icons Helper
However, if you try right now, you will see that Icons Helper refers to an adobe icon that does not exist anymore. It has been removed from the package in the master on Git but not yet on PubDev.
You could also just integrate icons_helper.dart in your project and maintain the map you need in your app.

Redirect to view in other image folders using ImagePicker plugin in android (Ionic 3)

I am using the image picker plugin in my Ionic app. I want able to pick images from other folders from the gallery in android device. For Ios it is possible but for android I am getting this view.
But I want user able to go to other folders and select images from it. Any help would be great.
I supose you are using cordova plugin File. If you want select others routes, u can use the diferents directories provided by File. EJ:
this.file.applicationStorageDirectory
this.file.applicationDirectory
this.file.documentsDirectory
You have the complete list here https://github.com/apache/cordova-plugin-file
If you need more help, say to me.
to use if With Filepicker use a constant to set options:
const options = {
title: 'Select Avatar',
customButtons: [{ name: 'fb', title: 'Choose Photo from Facebook' }],
storageOptions: {
skipBackup: true,
path: 'images',
},
};
and send it to the picker:
ImagePicker.showImagePicker(options, (response) => {

Meteor React using TinyMce with react-tinymce problems with iPad

I have an app with Meteor React using TinyMce through react-tinymce (as per instructions at https://www.tinymce.com/docs/integrations/react/
I have a form component with TinyMCE which is called from an orderedlist to allow users to add comments. It works as expected except in the following situation:
When using either an iPad or iPhone (works fine on desktops and Android mobile).
The first instance of the form works as expected, however with subsequent attempts to add comments the cursor does not show up in TinyMCE and the user cannot enter their comments.
Without an external keyboard, when the form is opened the keyboard pops up - I have found that by manually closing the keyboard, then tapping in the textarea again it works.
With an external keyboard (on iPad), clinking the link in the menubar (I am using the link plugin) and then closing it and tapping in the textarea again it works.
I have attached code to show how TinyMCE is initiated (and removed), as well as how it is called in the form.
Any suggestions as to what I can try to get this to work properly on an iPad/iPhone would be greatly appreciated.
componentDidMount() {
tinymce.remove();
tinymce.init({
selector: '.addComments,
plugins: "autoresize link paste",
paste_as_text: true,
autoresize_bottom_margin: 10,
relative_urls: false,
link_title: false,
default_link_target: "_blank",
height: 200,
autoresize_max_height: 200,
toolbar: 'underline italic numlist link',
menubar: '',
skin: "lightgray",
statusbar: false,
content_css : '/css/content.css'
});
}
componentWillUnmount() {
tinymce.remove();
}
And it is rendered as follows:
<div className="AddComments" id={`background${this.props.meetingId}`} onChange={this.handleEditorChange}></div>
I found that others are having problems with TinyMCE on an iPad https://github.com/tinymce/tinymce/issues/2699 so I have switched to react-quill and it works fine across all platforms.

IBM Worklight - How to disable Native device features?

I have created my application using IBM Worklight in Eclipse. I have added the iPhone environment and installed successfully my application on my device, but I have noticed that in some screens numbers appear with an underline and when tapped it shows a dialog box with call function.
I have tried using text-decoration:none so that underline does not appear, but it is still appearing. I have tried:
HTML
<span class="bluelink" data-dojo-type="dojox.mobile.TabBarButton">40562231</span>
CSS
.bluelink {
color:#1238a6; text-decoration:none;
}
Another issue I am facing is that when using alert(), it shows the title title as the HTML filename like MyApp.html. Anybody know how to fix this?
Instead of alert() use the WL.SimpleDialog API. Explained here.
WL.SimpleDialog.show(
"My Title",
"My Text",
[{
text: "First Button",
handler: function() {
WL.Logger.debug("First button tapped");
}
}]
)
As for the phone number, try the option here:
http://razoredgelabs.com/2013/03/how-to-stop-apple-ios-devices-from-styling-phone-numbers/
There are also the following questions:
How do I remove the blue styling of telephone numbers on iPhone/iOS?
Mobile HTML rendering numbers
Prevent Phone Number recognition on JqueryMobile
How to disable phone number linking in Mobile Safari?
https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html

Cordova 3.0.0 ActionSheet plugin for ios not working properly

I have installed cordova 3.0.0 version for ios recently and trying to create ActionSheet plugin for ios.
Now, My problem is when tap on button nothing happens means Actionsheet does not open.
It works fine in simulator but in device
when i double press home button then only actionsheet displays. it is working fine in cordova 2.9.0.
I have also checked Datepicker plugin in this the same issue happens.
my code is given below:
var actionSheet = cordova.require("cordova/plugin/actionsheet");
var options = {
title: 'MyTestApp',
items: ['Open gallery','Cancel']
};
options.visibility = "auto";
options.onDismiss = openActionsheet;
actionSheet.show(options);
Please help me with that....
I finally found the solution.
Place .h and .m file in Plugins folder. Now create plugins folder in www and ActionSheet.js file in that www/plugins/ActionSheet.js folder.
Add below line to Config.xml
<feature name="ActionSheet">
<param name="ios-package" value="ActionSheet" />
</feature>
Now you have config_plugin.js file in your www folder place below code in this file:
{
"file": "plugins/ActionSheet.js",
"id": "ActionSheet",
"clobbers": [
"actionSheet"
]
}
now you can call actionsheet method as below:
var options = {
title: 'Blownaway',
items: ['Open gallery','Cancel']
};
actionSheet.show(options);
No need to include ActionSheet.js in Script tag in html file for ActionSheet.js.
You can directly call actionSheet.show method.