ep_cursortrace
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -10,4 +10,3 @@ { | ||
"aceEditEvent": "ep_cursortrace/static/js/main:aceEditEvent", | ||
"handleClientMessage_CUSTOM": "ep_cursortrace/static/js/main", | ||
"documentReady":"ep_cursortrace/static/js/main" | ||
"handleClientMessage_CUSTOM": "ep_cursortrace/static/js/main" | ||
}, | ||
@@ -14,0 +13,0 @@ "hooks": { |
@@ -16,24 +16,8 @@ /*** | ||
*/ | ||
exports.handleMessage = async function(hook_name, context, callback){ | ||
exports.handleMessage = async function(hookName, context) { | ||
// Firstly ignore any request that aren't about cursor | ||
var iscursorMessage = false; | ||
if(context){ | ||
if(context.message){ | ||
if(context.message.type === 'COLLABROOM'){ | ||
if(context.message.data){ | ||
if(context.message.data.type){ | ||
if(context.message.data.type === 'cursor'){ | ||
iscursorMessage = true; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
if(!iscursorMessage){ | ||
callback(false); | ||
return false; | ||
} | ||
const {message: {type, data = {}} = {}} = context || {}; | ||
if (type !== 'COLLABROOM' || data.type !== 'cursor') return; | ||
var message = context.message.data; | ||
const message = data; | ||
/*** | ||
@@ -67,3 +51,3 @@ What's available in a message? | ||
callback([null]); | ||
return null; // null prevents Etherpad from attempting to process the message any further. | ||
} | ||
@@ -70,0 +54,0 @@ |
{ | ||
"name": "ep_cursortrace", | ||
"description": "Show cursor/caret movements of other users in real time", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"author": "RedHog (Egil Moeller) <egil.moller@freecode.no>", | ||
@@ -6,0 +6,0 @@ "repository": "git@github.com:redhog/ep_cursortrace.git", |
@@ -5,5 +5,2 @@ var initiated = false; | ||
exports.documentReady = function(){ | ||
} | ||
exports.aceInitInnerdocbodyHead = function(hook_name, args, cb) { | ||
@@ -16,2 +13,3 @@ args.iframeHTML.push('<link rel="stylesheet" type="text/css" href="../static/plugins/ep_cursortrace/static/css/ace_inner.css"/>'); | ||
initiated = true; | ||
return cb(); | ||
}; | ||
@@ -78,2 +76,3 @@ | ||
} | ||
return cb(); | ||
} | ||
@@ -235,2 +234,3 @@ | ||
} | ||
return cb(); | ||
} | ||
@@ -237,0 +237,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29152
11
405