Advertisement
Guest User

CICADA ONION 3 CODE

a guest
Jan 8th, 2014
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1.  
  2.  
  3. When I inspected the .onion site I looked at the UI scripts and it said (see below) and does this mean you have to be on a whitelist to access the site??
  4.  
  5.  
  6. start here=
  7.  
  8. // Requires jquery.
  9.  
  10.  
  11. // Lets you move up and down the DOM starting from a specific element.
  12.  
  13. function ElementChain(el) {
  14.  
  15. this._stack = [];
  16.  
  17. this._change_events = [];
  18.  
  19. this._stack.push($(el));
  20.  
  21. }
  22.  
  23. ElementChain.prototype.current = function() {
  24.  
  25. return this._stack[this._stack.length - 1];
  26.  
  27. }
  28.  
  29. ElementChain.prototype.moveUp = function() {
  30.  
  31. if (this.current().parent().length > 0 &&
  32.  
  33. this.current().parent()[0].nodeName != "BODY") {
  34.  
  35. this._stack.push(this.current().parent());
  36.  
  37. this.change();
  38.  
  39. return true;
  40.  
  41. }
  42.  
  43. return false;
  44.  
  45. }
  46.  
  47. ElementChain.prototype.moveDown = function() {
  48.  
  49. if (this._stack.length > 1) {
  50.  
  51. this._stack.pop();
  52.  
  53. this.change();
  54.  
  55. return true;
  56.  
  57. }
  58.  
  59. return false;
  60.  
  61. }
  62.  
  63. // Moves to the appropriate parent depth. 0 is the original element,
  64.  
  65. // 1 is its parent, etc.
  66.  
  67. ElementChain.prototype.moveTo = function(depth) {
  68.  
  69. while (this._stack.length > depth + 1)
  70.  
  71. if (!this.moveDown())
  72.  
  73. break;
  74.  
  75. while (this._stack.length < depth + 1)
  76.  
  77. if (!this.moveUp())
  78.  
  79. break;
  80.  
  81. }
  82.  
  83. ElementChain.prototype.change = function(listener, callback) {
  84.  
  85. if (callback) {
  86.  
  87. this._change_events.push([listener, callback]);
  88.  
  89. } else {
  90.  
  91. for (var i = 0; i < this._change_events.length; i++) {
  92.  
  93. var data = this._change_events[i];
  94.  
  95. data[1].call(data[0]);
  96.  
  97. }
  98.  
  99. }
  100.  
  101. }
  102.  
  103.  
  104. //@ sourceURL=/uiscripts/blacklisting/elementchain.js
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement