Skip to content

Commit 769dde0

Browse files
Bug: id, not class
1 parent 1ce36e8 commit 769dde0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gwynethllewelyn/postlocalstorage/styles/prosilver/template/custom_functions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
(function (message, doc) {
22
// If there is no localStorage support, give up
33
if (!message.localStorage) return;
4-
// phpBB3 uses a textarea with id and class 'message'
5-
var textarea = doc.querySelector("textarea.message");
4+
// phpBB3 uses a textarea with id and name 'message'
5+
var textarea = doc.querySelector("textarea#message");
6+
// no point in being around if this is nil; also: avoids crashing below (gwyneth 20220303)
7+
if (!textarea) return;
68
// The key for the key/value pair in localStorage is the current URL.
79
var key = message.location.href;
810
var item = null;

0 commit comments

Comments
 (0)