Skip to content

Commit 9b60218

Browse files
committed
Cancel if there is no thread
1 parent 86911e5 commit 9b60218

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scpwiki-staff-id",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "A [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) userscript that adds a line of text to forum posts by staff members to show you what position they hold.",
55
"main": "scpwiki-staff-ids.user.js",
66
"scripts": {

scpwiki-staff-ids.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ select "SCP-Wiki Staff Identification", and click Uninstall.
1717
// ==UserScript==
1818
// @name SCP-Wiki Staff Identification 2
1919
// @description Shows who's staff and what position they hold
20-
// @version v2.2.0
20+
// @version v2.2.1
2121
// @updateURL https://github.com/scpwiki/SCP-Wiki-Staff-Identification/raw/master/scpwiki-staff-ids.user.js
2222
// @downloadURL https://github.com/scpwiki/SCP-Wiki-Staff-Identification/raw/master/scpwiki-staff-ids.user.js
2323
// @include http://scpwiki.com/forum*
@@ -172,6 +172,7 @@ function setStaffIds() {
172172
} else {
173173
container = document.getElementsByClassName("thread-container")[0];
174174
}
175+
if (!container) return;
175176

176177
var infoSpans = container.getElementsByClassName("info");
177178
var userName = "";

0 commit comments

Comments
 (0)