Skip to content

Commit ce5d3d7

Browse files
committed
Updated to use Mashape commercial API for Imgur.
1 parent 0180279 commit ce5d3d7

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Screenshots/

rehostimage/install.rdf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<Description about="urn:mozilla:install-manifest">
77
<em:id>rehostimage@engy.us</em:id>
8-
<em:version>1.5.18</em:version>
8+
<em:version>1.5.19</em:version>
99
<em:type>2</em:type>
1010

1111
<!-- Target Application this extension can install into,
@@ -14,7 +14,7 @@
1414
<Description>
1515
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
1616
<em:minVersion>25.0</em:minVersion>
17-
<em:maxVersion>45.*</em:maxVersion>
17+
<em:maxVersion>48.*</em:maxVersion>
1818
</Description>
1919
</em:targetApplication>
2020

rehostimage/modules/imgur3.jsm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var Imgur3RI = {
111111

112112
var message = {
113113
method: "POST",
114-
action: "https://api.imgur.com/3/image",
114+
action: "https://imgur-apiv3.p.mashape.com/3/image",
115115
useAccessToken: useAccessToken,
116116
parameters: {
117117
image: base64data,
@@ -213,6 +213,8 @@ var Imgur3RI = {
213213
} else {
214214
request.setRequestHeader("Authorization", "Client-ID " + clientId);
215215
}
216+
217+
request.setRequestHeader("X-Mashape-Key", "rzpl6X8Q59mshZdtV36ci8T7HiREp1jqb0KjsnbtvQNAdbgIzA");
216218

217219
if (progress) {
218220
request.upload.addEventListener("progress", progress, false);

0 commit comments

Comments
 (0)