Conversaciones » Desarrolladores
How to get current object or id of content we click on keypress
Can anyone tell how to get this?
this is code link https://greasyfork.org/en/scripts/3001-annotation/code
event.target
usually.
sorry i am not getting current id when i click that
this is place it trigger when ever i click any content
c.prototype.getSelectedRanges = function () {
var b, c, d, g, h, i, j, k, l;
j = f.getGlobal().getSelection(), h = [], i = [], j.isCollapsed || (h = function () {
var a, f, h;
h = [];
for (c = a = 0, f = j.rangeCount; 0 <= f ? a < f : a > f; c = 0 <= f ? ++a : --a)
g = j.getRangeAt(c), b = new e.BrowserRange(g), d = b.normalize().limit(this.wrapper[0]), d === null && i.push(g), h.push(d);
return h
}.call(this), j.removeAllRanges());
console.log("2 "+this.wrapper[0]);
for (k = 0, l = i.length; k < l; k++)
g = i[k], j.addRange(g);
console.log(this.target);
return a.grep(h, function (a) {
console.log(this.element);
return a && j.addRange(a.toRange()), a
})
}
i want to get clicked object id here.
Can any one tell how to get that?
Well, this is a minified/obfuscated version of the script. Find the original coffeescript code and it'll be easier to understand what's happening.
How to get current object or id of content we click on keypress
How to get current object or id of content we click on keypress