ep_comments_page 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Adds comments on sidebar and link it to the text. For no-skin use ep_page_view.",
|
|
3
3
|
"name": "ep_comments_page",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.37",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Nicolas Lescop",
|
|
7
7
|
"email": "limplementeur@gmail.com"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"eslint": "^8.57.0",
|
|
31
31
|
"eslint-config-etherpad": "^4.0.4",
|
|
32
|
-
"socket.io-client": "
|
|
32
|
+
"socket.io-client": "*",
|
|
33
33
|
"superagent": "^8.1.2",
|
|
34
34
|
"typescript": "^5.4.2"
|
|
35
35
|
},
|
package/static/js/index.js
CHANGED
|
@@ -19,6 +19,8 @@ const preCommentMark = require('ep_comments_page/static/js/preCommentMark');
|
|
|
19
19
|
const getCommentIdOnFirstPositionSelected = events.getCommentIdOnFirstPositionSelected;
|
|
20
20
|
const hasCommentOnSelection = events.hasCommentOnSelection;
|
|
21
21
|
const Security = require('ep_etherpad-lite/static/js/security');
|
|
22
|
+
// eslint-disable-next-line no-redeclare
|
|
23
|
+
const io = require('socket.io-client');
|
|
22
24
|
|
|
23
25
|
const cssFiles = [
|
|
24
26
|
'ep_comments_page/static/css/comment.css',
|
|
@@ -789,7 +791,12 @@ EpComments.prototype.getCommentData = function () {
|
|
|
789
791
|
|
|
790
792
|
// Delete a pad comment
|
|
791
793
|
EpComments.prototype.deleteComment = function (commentId) {
|
|
792
|
-
$('iframe[name="ace_outer"]').contents().find(`#${commentId}`).
|
|
794
|
+
while($('iframe[name="ace_outer"]').contents().find(`#${commentId}`).length > 0){
|
|
795
|
+
$('iframe[name="ace_outer"]').contents().find(`#${commentId}`).remove();
|
|
796
|
+
}
|
|
797
|
+
while($('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).length > 0){
|
|
798
|
+
$('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).remove();
|
|
799
|
+
}
|
|
793
800
|
};
|
|
794
801
|
|
|
795
802
|
const cloneLine = (line) => {
|