Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ep_bookmark

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_bookmark - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

ep.json

@@ -6,3 +6,3 @@ {

"hooks": {
"eejsBlock_editbarMenuRight": "ep_bookmark/hooks:eejsBlock_editbarMenuRight",
"eejsBlock_editbarMenuRight": "ep_bookmark/hooks:eejsBlock_editbarMenuRight",
"eejsBlock_styles": "ep_bookmark/hooks:eejsBlock_styles",

@@ -9,0 +9,0 @@ "eejsBlock_body": "ep_bookmark/hooks:eejsBlock_body"

@@ -10,3 +10,3 @@ {

"ep_bookmark.saveIcon.title": "Speichere den Kommentar für dieses Lesezeichen",
"ep_bookmark.closeIcon.title": "Breche das Editieren des Kommentares ab",
"ep_bookmark.closeIcon.title": "Breche das Editieren des Kommentars ab",
"ep_bookmark.deleteIcon.title": "Lösche dieses Lesezeichen",

@@ -16,3 +16,4 @@ "ep_bookmark.autoAdded": "automatisch hinzugefügt",

"ep_bookmark.info": "Info",
"ep_bookmark.info.title": "Hier können Lesezeichen der Pads dieses Servers gespeichert werden. Diese werden nur in diesem Browser gespeichert. Die Anzeige der Pads ist sortiert nach dem zuletzt Besuchten"
"ep_bookmark.info.title": "Hier können Lesezeichen der Pads dieses Servers gespeichert werden. Diese werden nur in diesem Browser gespeichert. Die Anzeige der Pads ist sortiert nach dem letzten Besuch.",
"ep_bookmark.notSupported": "Dein Browser unterstützt das Speichern von Lesezeichen nicht."
}

@@ -15,3 +15,4 @@ {

"ep_bookmark.info": "Info",
"ep_bookmark.info.title": "Here you can save a list of your pads on this server. The list is only stored in your browser and is ordered beginning with the latest visited pad."
"ep_bookmark.info.title": "Here you can save a list of your pads on this server. The list is only stored in your browser and is ordered beginning with the latest visited pad.",
"ep_bookmark.notSupported": "Your browser does not support saving of bookmarks."
}
{
"name": "ep_bookmark",
"version": "1.0.1",
"version": "1.0.2",
"description": "Etherpad plugin for users to save a list of bookmarks of their visited pads locally in the browser's local storage",

@@ -5,0 +5,0 @@ "author": "gared (STEFAN MUELLER) <stefan@stefans-entwicklerecke.de>",

@@ -6,2 +6,2 @@ #Etherpad plugin ep_bookmark

![Etherpad plugin ep_bookmark](http://www.stefans-entwicklerecke.de/wp-content/uploads/2015/01/screenshot_ep_bookmark.png)
![Etherpad plugin ep_bookmark](http://www.stefans-entwicklerecke.de/wp-content/uploads/2015/03/screenshot_ep_bookmark.png)

@@ -5,47 +5,42 @@ /**

var refreshPadList = function() {
var bookmarks = bookmarkStorage.getAllPadBookmarks();
var padDiv;
var padLinkTag;
var commentTag;
var commentEditTag;
var editTag;
var saveTag;
var closeTag;
$("#padBookmarkList").empty();
if (bookmarkStorage.supported()) {
var bookmarks = bookmarkStorage.getAllPadBookmarks();
var padDiv;
var padLinkTag;
var commentTag;
var commentEditTag;
var editTag;
var saveTag;
var closeTag;
if (bookmarks.length == 0) {
$("#padBookmarkList").append("<div id='noPads'></div>").text(html10n.get("ep_bookmark.noPads"));
} else {
for (var i=0; i < bookmarks.length; i++) {
padDiv = $("<div/>").attr('class', 'padBookmark').attr('id', bookmarks[i].padId);
padLinkTag = $("<a class='bookmarkPadId' href='javascript:pad.switchToPad(\""+bookmarks[i].padId+"\")'>"+bookmarks[i].padId+"</a>").attr('title', html10n.get("ep_bookmark.lastVisit")+': '+new Date(bookmarks[i].timestamp).toLocaleString());
commentTag = $("<span/>").attr('class', 'comment').text(bookmarks[i].description);
commentEditTag = $("<input/>").attr('class', 'editComment');
editTag = $("<a class='editIcon' href='#'>&#9997;</a>'").click(editCommentClick);
saveTag = $("<a class='saveIcon' href='#'>&#10003;</a>'").click(saveCommentClick);
closeTag = $("<a class='closeIcon' href='#'>&#10007;</a>'").click(closeCommentClick);
deleteTag = $("<a class='deleteIcon' href='#'>&#10006;</a>").click(removePadClick);
padDiv.append(padLinkTag).append(" ").append(commentTag).append(commentEditTag).append(" ").append(editTag).append(saveTag).append(closeTag).append(deleteTag);
$("#padBookmarkList").append(padDiv);
}
$(".editIcon").attr('title', (html10n.get("ep_bookmark.editIcon.title")));
$(".saveIcon").attr('title', (html10n.get("ep_bookmark.saveIcon.title")));
$(".closeIcon").attr('title', (html10n.get("ep_bookmark.closeIcon.title")));
$(".deleteIcon").attr('title', (html10n.get("ep_bookmark.deleteIcon.title")));
if (bookmarks.length == 0) {
$("#padBookmarkList").append("<div id='noPads'></div>").text(html10n.get("ep_bookmark.noPads"));
} else {
for (var i=0; i < bookmarks.length; i++) {
padDiv = $("<div/>").attr('class', 'padBookmark').attr('id', bookmarks[i].padId);
padLinkTag = $("<a class='bookmarkPadId' href='javascript:pad.switchToPad(\""+bookmarks[i].padId+"\")'>"+bookmarks[i].padId+"</a>").attr('title', html10n.get("ep_bookmark.lastVisit")+': '+new Date(bookmarks[i].timestamp).toLocaleString());
commentTag = $("<span/>").attr('class', 'comment').text(bookmarks[i].description);
commentEditTag = $("<input/>").attr('class', 'editComment');
editTag = $("<a class='editIcon' href='#'>&#9997;</a>'").click(editCommentClick);
saveTag = $("<a class='saveIcon' href='#'>&#10003;</a>'").click(saveCommentClick);
closeTag = $("<a class='closeIcon' href='#'>&#10007;</a>'").click(closeCommentClick);
deleteTag = $("<a class='deleteIcon' href='#'>&#10006;</a>").click(removePadClick);
padDiv.append(padLinkTag).append(" ").append(commentTag).append(commentEditTag).append(" ").append(editTag).append(saveTag).append(closeTag).append(deleteTag);
$("#padBookmarkList").append(padDiv);
$(".editComment").keyup(function(e){
// ESC pressed
if (e.keyCode == 27){
abortCommentEditing($(e.currentTarget).parent());
// Enter pressed
} else if (e.keyCode == 13) {
saveComment($(e.currentTarget).parent());
}
$(".editIcon").attr('title', (html10n.get("ep_bookmark.editIcon.title")));
$(".saveIcon").attr('title', (html10n.get("ep_bookmark.saveIcon.title")));
$(".closeIcon").attr('title', (html10n.get("ep_bookmark.closeIcon.title")));
$(".deleteIcon").attr('title', (html10n.get("ep_bookmark.deleteIcon.title")));
$(".editComment").keyup(function(e){
// ESC pressed
if (e.keyCode == 27){
abortCommentEditing($(e.currentTarget).parent());
// Enter pressed
} else if (e.keyCode == 13) {
saveComment($(e.currentTarget).parent());
}
});
}
} else {
$("#padBookmarkList").text("Not supported");
});
}

@@ -94,6 +89,18 @@ }

supported: function() {
return typeof(Storage) !== "undefined";
var mod = 'padBookmarksTest';
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch(e) {
return false;
}
},
getLocalStorageItem: function() {
var item = localStorage.getItem("padBookmarks");
var item = null;
try {
item = localStorage.getItem("padBookmarks");
} catch (e) {
}
if (item == null) {

@@ -154,3 +161,7 @@ item = {"options": {}, "padList": []};

saveLocalStorageItem: function(storageItem) {
localStorage.setItem("padBookmarks", JSON.stringify(storageItem));
try {
localStorage.setItem("padBookmarks", JSON.stringify(storageItem));
} catch (e) {
}
},

@@ -314,12 +325,20 @@ addPad: function(padId, desc) {

$("#infoText").attr("title", html10n.get("ep_bookmark.info.title"));
$("#addBookmarksAutomatically").attr('title', html10n.get("ep_bookmark.addBookmarksAutomatically.title"));
$("#managePadBookmarks").attr('title', html10n.get("ep_bookmark.bookmarkTitle"));
if (bookmarkStorage.supported()) {
$("#padBookmarkMain").show();
$("#padBookmarkError").hide();
$("#autoAddBookmarkCheckbox").attr('checked', bookmarkStorage.getOption("addBookmarksAutomatically"));
$("#addPadBookmark").attr('disabled', $("#autoAddBookmarkCheckbox").attr('checked'));
refreshPadList();
} else {
$("#padBookmarkMain").hide();
$("#padBookmarkError").show();
}
}
refreshPadList();
});
$("#autoAddBookmarkCheckbox").attr('checked', bookmarkStorage.getOption("addBookmarksAutomatically"));
$("#addPadBookmark").attr('disabled', $("#autoAddBookmarkCheckbox").attr('checked'))
.click(function() {
bookmarkStorage.addPad(pad.getPadId());
$("#addPadBookmark").click(function() {
bookmarkStorage.addPad(pad.getPadId());
});

@@ -336,6 +355,2 @@

autoAddBookmark();
$("#addBookmarksAutomatically").attr('title', html10n.get("ep_bookmark.addBookmarksAutomatically.title"));
$("#managePadBookmarks").attr('title', html10n.get("ep_bookmark.bookmarkTitle"));
}

@@ -342,0 +357,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc