/usr/share/javascript/hooker.min.js is in libjs-hooker 0.2.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 | /*
* JavaScript Hooker
* http://github.com/cowboy/javascript-hooker
*
* Copyright (c) 2012 "Cowboy" Ben Alman
* Licensed under the MIT license.
* http://benalman.com/about/license/
*/(function(e){function r(e){this.value=e}function i(e){this.value=e}function s(e,t){this.context=e,this.args=t}function o(e,t,r){var i;if(typeof t=="string")t=[t];else if(t==null){t=[];for(i in e)e.hasOwnProperty(i)&&t.push(i)}var s=t.length;while(s--)(n.call(e[t[s]])!=="[object Function]"||r(e,t[s])===!1)&&t.splice(s,1);return t}var t=[].slice,n={}.toString;e.override=function(e){return new r(e)},e.preempt=function(e){return new i(e)},e.filter=function(e,t){return new s(e,t)},e.hook=function(n,u,a){return a==null&&(a=u,u=null),typeof a=="function"&&(a={pre:a}),o(n,u,function(n,o){function f(){var f,l,c,h=t.call(arguments);return a.passName&&h.unshift(o),a.pre&&(f=a.pre.apply(this,h)),f instanceof s?l=f=u.apply(f.context,f.args):f instanceof i?l=f=f.value:(l=u.apply(this,arguments),f=f instanceof r?f.value:l),a.post&&(c=a.post.apply(this,[l].concat(h)),c instanceof r&&(f=c.value)),a.once&&e.unhook(n,o),f}var u=n[o];n[o]=f;if(n[o]!==f)return!1;n[o]._orig=u})},e.orig=function(e,t){return e[t]._orig},e.unhook=function(t,n){return o(t,n,function(t,n){var r=e.orig(t,n);if(!r)return!1;t[n]=r})}})(typeof exports=="object"&&exports||this);
|