mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1173158 - Fixing imgur upload error. r=jryans
This commit is contained in:
parent
9966208d30
commit
df1410d01e
@ -133,10 +133,13 @@ exports.items = [
|
||||
}
|
||||
|
||||
// Click handler
|
||||
if (imageSummary.filename) {
|
||||
if (imageSummary.href || imageSummary.filename) {
|
||||
root.style.cursor = "pointer";
|
||||
root.addEventListener("click", () => {
|
||||
if (imageSummary.filename) {
|
||||
if (imageSummary.href) {
|
||||
const gBrowser = context.environment.chromeWindow.gBrowser;
|
||||
gBrowser.selectedTab = gBrowser.addTab(imageSummary.href);
|
||||
} else if (imageSummary.filename) {
|
||||
const file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(imageSummary.filename);
|
||||
file.reveal();
|
||||
@ -406,16 +409,15 @@ function uploadToImgur(reply) {
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 200) {
|
||||
reply.href = xhr.response.data.link;
|
||||
reply.destinations.push(l10n.lookupFormat("screenshotImgurError",
|
||||
reply.destinations.push(l10n.lookupFormat("screenshotImgurUploaded",
|
||||
[ reply.href ]));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
reply.destinations.push(l10n.lookup("screenshotImgurError"));
|
||||
}
|
||||
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,11 @@ function addParamGroups(command) {
|
||||
* Get a data block for the help_man.html/help_man.txt templates
|
||||
*/
|
||||
function getHelpManData(commandData, context) {
|
||||
// Filter out hidden parameters
|
||||
commandData.command.params = commandData.command.params.filter(
|
||||
param => !param.hidden
|
||||
);
|
||||
|
||||
addParamGroups(commandData.command);
|
||||
commandData.subcommands.forEach(addParamGroups);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user