We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ce36e8 commit 769dde0Copy full SHA for 769dde0
gwynethllewelyn/postlocalstorage/styles/prosilver/template/custom_functions.js
@@ -1,8 +1,10 @@
1
(function (message, doc) {
2
// If there is no localStorage support, give up
3
if (!message.localStorage) return;
4
- // phpBB3 uses a textarea with id and class 'message'
5
- var textarea = doc.querySelector("textarea.message");
+ // phpBB3 uses a textarea with id and name 'message'
+ 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;
8
// The key for the key/value pair in localStorage is the current URL.
9
var key = message.location.href;
10
var item = null;
0 commit comments