🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ep_author_hover

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_author_hover - npm Package Compare versions

Comparing version

to
0.0.9

2

package.json

@@ -9,3 +9,3 @@ {

"description": "Adds author names to span titles (shows on hover), works as authors change their name. Hover includes author color and fast switching between author spans. Hat tip to Martyn York for the initial work on this.",
"version": "0.0.8",
"version": "0.0.9",
"repository": {

@@ -12,0 +12,0 @@ "type": "git",

@@ -63,3 +63,5 @@ var _ = require('ep_etherpad-lite/static/js/underscore');

if(clientVars.plugins.plugins.ep_author_hover.enabled){
var authorId = showAuthor.authorIdFromClass($(span.target).closest('span').get(0).className); // Get the authorId
var authorTarget = $(span.target).closest('span').get(0);
if (!authorTarget){ return; } // We might not be over a valid target
var authorId = showAuthor.authorIdFromClass(authorTarget.className); // Get the authorId
if(!authorId){ return; } // Default text isn't shown

@@ -130,5 +132,10 @@ showAuthor.destroy(); // Destroy existing

var outBody = $('iframe[name="ace_outer"]').contents().find("body");
var lt = /</g,
gt = />/g,
ap = /'/g,
ic = /"/g;
authorName = authorName.toString().replace(lt, "&lt;").replace(gt, "&gt;").replace(ap, "&#39;").replace(ic, "&#34;");
var $indicator = $("<div class='authortooltip' style='opacity:.8;font-size:14px;padding:5px 5px 0px 5px;position:absolute;left:"+left+"px;top:"+top +"px;background-color:"+authorColor+"' title="+authorName+">"+authorName+"</div>");
$(outBody).append($indicator);
// After a while, fade out

@@ -135,0 +142,0 @@ setTimeout(function(){