Skip to content

Commit cdb11cf

Browse files
Merge branch 'master' into master
2 parents 1a85820 + 55690f9 commit cdb11cf

File tree

7 files changed

+85
-35
lines changed

7 files changed

+85
-35
lines changed

.all-contributorsrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"projectName": "post-local-storage",
3+
"projectOwner": "GwynethLlewelyn",
4+
"files": [
5+
"README.md"
6+
],
7+
"commitType": "docs",
8+
"commitConvention": "angular",
9+
"contributorsPerLine": 7,
10+
"contributors": [
11+
{
12+
"login": "kylesands",
13+
"name": "kylesands",
14+
"avatar_url": "https://avatars.githubusercontent.com/u/9731115?v=4",
15+
"profile": "https://github.com/kylesands"
16+
},
17+
{
18+
"login": "gvp9000",
19+
"name": "gvp9000",
20+
"avatar_url": "https://avatars.githubusercontent.com/u/24462297?v=4",
21+
"profile": "https://github.com/gvp9000"
22+
}
23+
],
24+
"contributions": [
25+
"code",
26+
"ideas"
27+
]
28+
}

.github/workflows/codacy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ jobs:
5656

5757
# Upload the SARIF file generated in the previous step
5858
- name: Upload SARIF results file
59-
uses: github/codeql-action/upload-sarif@v2
59+
uses: github/codeql-action/upload-sarif@v3
6060
with:
6161
sarif_file: results.sarif

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
Mora _complex_ ones should be (preferably!) as a Pull Request (PR) on GitHub.
66

7+
And don't forget to (automatically) add yourself as a contributor: https://allcontributors.org/docs/en/bot/usage
8+
79
## Trivia
810

911
The magic I use for zipping things properly (on a Mac) is:
1012

1113
`zip postlocalstorage.zip -9 -x \*/.DS_Store -r gwynethllewelyn/`
14+
15+
I'm trying to design a workflow to make this happen automagically once a new release is pushed out.

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,41 @@ Since I have just a limited access to a testing environment, it's worth pointing
4242

4343
Additionally, there are "mock" pages (coming with the GitHub package, but _not_ with the phpBB3 plugin itself) that allow me to do some testing under different circumstances (I found some weird bugs that way!), beyond those that are handled by the automated CI tools that I'm currently using.
4444

45-
## Acknowledgements
45+
## Contributors ✨
46+
47+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
48+
49+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
50+
<!-- prettier-ignore-start -->
51+
<!-- markdownlint-disable -->
52+
<table>
53+
<tbody>
54+
<tr>
55+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kylesands"><img src="https://avatars.githubusercontent.com/u/9731115?v=4?s=100" width="100px;" alt="kylesands"/><br /><sub><b>kylesands</b></sub></a><br /><a href="#code-kylesands" title="Code">💻</a> <a href="#ideas-kylesands" title="Ideas, Planning, & Feedback">🤔</a></td>
56+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gvp9000"><img src="https://avatars.githubusercontent.com/u/24462297?v=4?s=100" width="100px;" alt="gvp9000"/><br /><sub><b>gvp9000</b></sub></a><br /><a href="#code-gvp9000" title="Code">💻</a> <a href="#ideas-gvp9000" title="Ideas, Planning, & Feedback">🤔</a></td>
57+
</tr>
58+
</tbody>
59+
</table>
60+
61+
<!-- markdownlint-restore -->
62+
<!-- prettier-ignore-end -->
63+
64+
<!-- ALL-CONTRIBUTORS-LIST:END -->
65+
66+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
67+
68+
## More acknowledgements
4669

4770
Many thanks to
4871
[@Tread](https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=1973496) and [@cabot](https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=1337922) for gently 'persuading' me to publish this code as a phpBB3.3 extension, by pointing me to all the appropriate bits and pieces of code to be 'assembled' into an extension. Yay!
4972

50-
Kudos to [@gvp9000](https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=2227069) for finding & fixing an obscure bug that affects Firefox.
73+
Kudos to [@gvp9000](https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=2227069) for finding & fixing an obscure bug that affects Firefox and submitting lots of code to fix this.
5174

5275
Kudos to [@kylesands](https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=2218926) for pointing out and providing a fix for [incorrect local storage deletion during Preview](https://www.phpbb.com/customise/db/extension/postlocalstorage/support/topic/246115?p=877342#p877342) as well as for continuing overall support.
5376

5477
Thanks to [@TrekRed](https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=19327714) for suggesting that the subject field gets saved as well.
5578

5679
Logo designed by [DALL·E 2](https://openai.com/product/dall-e-2).
5780

58-
![phpBB3 Logo](https://img.shields.io/badge/phpBB-3.3-blue) [![CodeQL](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codeql.yml/badge.svg)](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codeql.yml) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/83a20d04433341baa65c78d29fc3410a)](https://www.codacy.com/gh/GwynethLlewelyn/post-local-storage/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GwynethLlewelyn/post-local-storage&utm_campaign=Badge_Grade) [![Codacy Security Scan](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codacy.yml/badge.svg)](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codacy.yml) [![Liberapay](https://img.shields.io/liberapay/receives/GwynethLlewelyn.svg?logo=liberapay")](https://liberapay.com/GwynethLlewelyn/donate)
81+
![phpBB3 Logo](https://img.shields.io/badge/phpBB-3.3-blue) [![CodeQL](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codeql.yml/badge.svg)](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codeql.yml) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/83a20d04433341baa65c78d29fc3410a)](https://www.codacy.com/gh/GwynethLlewelyn/post-local-storage/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GwynethLlewelyn/post-local-storage&utm_campaign=Badge_Grade) [![Codacy Security Scan](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codacy.yml/badge.svg)](https://github.com/GwynethLlewelyn/post-local-storage/actions/workflows/codacy.yml) [![Liberapay](https://img.shields.io/liberapay/receives/GwynethLlewelyn.svg?logo=liberapay")](https://liberapay.com/GwynethLlewelyn/donate) [![All Contributors](https://img.shields.io/github/all-contributors/GwynethLlewelyn/post-local-storage?color=ee8449&style=flat-square)](#contributors)
82+

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// eslint 9.1.0 config file
2+
// @ts-nocheck
23
module.exports = [
34
{
45
languageOptions: {
56
ecmaVersion: "latest",
67
sourceType: "script"
78
},
89
files: ["**/*.js"],
9-
ignores: ["**/.*", ".*/*"]
10+
ignores: ["**/.*", ".*/*"],
1011
}
1112
];

gwynethllewelyn/postlocalstorage/styles/all/template/postlocalstorage_functions.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
// @see https://www.phpbb.com/customise/db/extension/postlocalstorage/support/topic/246616?p=877489#p877489
5757
//if key.includes (viewforum.php) then exit
5858
if (key.includes("viewforum.php")) {
59-
console.debug("viewforum, no message box");
60-
return;
59+
console.debug("viewforum, no message box");
60+
return;
6161
}
6262

6363
// POSTING
@@ -70,7 +70,7 @@
7070
if (key.endsWith("#preview")) {
7171
var count_hash = key.split("#").length - 1;
7272
for (let i = 0; i < count_hash; i++) {
73-
key = key.substring(0, key.lastIndexOf('#'));
73+
key = key.substring(0, key.lastIndexOf('#'));
7474
}
7575
}
7676
}
@@ -86,14 +86,14 @@
8686
//./phpBB3/ucp.php?i=ucp_pm&mode=compose returns
8787
//./phpBB3/ucp.php?i=pm&mode=compose
8888
else if (key.includes("ucp.php?i=ucp_pm&mode=compose")) {
89-
key = key.split("?")[0].concat("?i=pm&mode=compose");
89+
key = key.split("?")[0].concat("?i=pm&mode=compose");
9090
}
9191

9292
//3 case
9393
//./phpBB3/ucp.php?i=pm&mode=compose&action=post&sid=sssssssssssssssssssssssssss returns
9494
//./phpBB3/ucp.php?i=pm&mode=compose
9595
else if (key.includes("ucp.php?i=pm&mode=compose&action=post")) {
96-
key = key.split("?")[0].concat("?i=pm&mode=compose");
96+
key = key.split("?")[0].concat("?i=pm&mode=compose");
9797
}
9898

9999
//4 case
@@ -107,11 +107,11 @@
107107
//./phpBB3/ucp.php?i=pm&mode=compose&action=quote&p=yyy
108108

109109
else if (key.includes("ucp.php?i=pm&mode=compose&action=reply&f=") || key.includes("ucp.php?i=pm&mode=compose&action=forward&f=") || key.includes("ucp.php?i=pm&mode=compose&action=quote&f=")) {
110-
var fpos = key.indexOf("&f="),
111-
ppos = key.indexOf("&p=");
112-
if (fpos > -1 && ppos > fpos) {
113-
key = key.substr(0, fpos)+key.substr(ppos);
114-
}
110+
var fpos = key.indexOf("&f="),
111+
ppos = key.indexOf("&p=");
112+
if (fpos > -1 && ppos > fpos) {
113+
key = key.substr(0, fpos) + key.substr(ppos);
114+
}
115115
}
116116

117117
//7 case
@@ -123,15 +123,17 @@
123123
//9th case
124124
//./phpBB3/ucp.php?i=pm&mode=compose&action=quote&sid=sssssssssssssssssssssssssss&p=yyy returns
125125
//./phpBB3/ucp.php?i=pm&mode=compose&action=quote&p=yyy
126-
else if (key.includes("ucp.php?i=pm&mode=compose&action=reply&sid=") || key.includes("ucp.php?i=pm&mode=compose&action=forward&sid=") || key.includes("ucp.php?i=pm&mode=compose&action=quote&sid=")) {
127-
var sipos = key.indexOf("&sid="),
128-
pipos = key.indexOf("&p=");
129-
if (sipos > -1 && pipos > sipos) {
130-
key = key.substr(0, sipos)+key.substr(pipos);
131-
}
126+
else if (key.includes("ucp.php?i=pm&mode=compose&action=reply&sid=")
127+
|| key.includes("ucp.php?i=pm&mode=compose&action=forward&sid=")
128+
|| key.includes("ucp.php?i=pm&mode=compose&action=quote&sid=")) {
129+
var sipos = key.indexOf("&sid="),
130+
pipos = key.indexOf("&p=");
131+
if (sipos > -1 && pipos > sipos) {
132+
key = key.substr(0, sipos) + key.substr(pipos);
133+
}
132134
}
133135
else {
134-
console.debug("no appropriate message key or pm key found");
136+
console.debug("no appropriate message key or pm key found");
135137
}
136138

137139
/**
@@ -276,4 +278,4 @@
276278
}
277279
}
278280
);
279-
})(this, this.document);
281+
})(this, this.document);

version_check.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
{
2-
"unstable": {
3-
"1.2": {
4-
"current": "1.2.0",
5-
"download": "https:\/\/github.com\/GwynethLlewelyn\/post-local-storage\/releases\/download\/v1.2.0\/postlocalstorage.zip",
6-
"announcement": "https:\/\/www.phpbb.com\/customise\/db\/extension\/postlocalstorage\/",
7-
"eol": null,
8-
"security": false
9-
}
10-
},
112
"stable": {
12-
"1.1": {
13-
"current": "1.1.0",
14-
"download": "https:\/\/github.com\/GwynethLlewelyn\/post-local-storage\/releases\/download\/v1.1.0\/postlocalstorage.zip",
3+
"1.2": {
4+
"current": "1.2.1",
5+
"download": "https:\/\/github.com\/GwynethLlewelyn\/post-local-storage\/releases\/download\/v1.2.1\/postlocalstorage.zip",
156
"announcement": "https:\/\/www.phpbb.com\/customise\/db\/extension\/postlocalstorage\/",
167
"eol": null,
178
"security": false

0 commit comments

Comments
 (0)