Skip to content

Commit

Permalink
Revert "1.0.9 Bugfix: get post ID error."
Browse files Browse the repository at this point in the history
This reverts commit 5796616.
  • Loading branch information
Cerbrus committed May 16, 2017
2 parents 5796616 + eccb86d commit 4fadfc3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion fire/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ To open the reported post on it's site:

|1.0 ||
| --- |---
|1.0.9 |Bugfix: got incorrect post ID for reports where the url contains a number.
|1.0.8 |Log toastr messages to the console.
|1.0.7 |Show "loading" error notification if FIRE fails to load a MS report.
|1.0.6 |Fixing incorrect escaping of HTML: Whitelisted some tags.
Expand Down
2 changes: 1 addition & 1 deletion fire/fire.meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// @description FIRE adds a button to SmokeDetector reports that allows you to provide feedback & flag, all from chat.
// @author Cerbrus
// @attribution Michiel Dommerholt (https://github.com/Cerbrus)
// @version 1.0.9
// @version 1.0.8
// @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.meta.js
// @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.user.js
// @supportURL https://github.com/Charcoal-SE/Userscripts/issues
Expand Down
8 changes: 4 additions & 4 deletions fire/fire.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// @description FIRE adds a button to SmokeDetector reports that allows you to provide feedback & flag, all from chat.
// @author Cerbrus
// @attribution Michiel Dommerholt (https://github.com/Cerbrus)
// @version 1.0.9
// @version 1.0.8
// @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.meta.js
// @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.user.js
// @supportURL https://github.com/Charcoal-SE/Userscripts/issues
Expand Down Expand Up @@ -277,9 +277,9 @@
({user_name}) => user_name === fire.chatUser.name
);

const match = data.link.match(/.*\/(\d+)/);
if (match && match[1])
[, data.post_id] = match;
const match = data.link.match(/\d+/);
if (match && match[0])
[data.post_id] = match;

fire.reportCache[data.link] = data; // Store the data

Expand Down

0 comments on commit 4fadfc3

Please sign in to comment.