__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
YUI.add('queue-promote', function (Y, NAME) {
/**
* Adds methods promote, remove, and indexOf to Queue instances.
*
* @module queue-promote
* @for Queue
*/
Y.mix(Y.Queue.prototype, {
/**
* Returns the current index in the queue of the specified item
*
* @method indexOf
* @param needle {MIXED} the item to search for
* @return {Number} the index of the item or -1 if not found
*/
indexOf : function (callback) {
return Y.Array.indexOf(this._q, callback);
},
/**
* Moves the referenced item to the head of the queue
*
* @method promote
* @param item {MIXED} an item in the queue
*/
promote : function (callback) {
var index = this.indexOf(callback);
if (index > -1) {
this._q.unshift(this._q.splice(index,1)[0]);
}
},
/**
* Removes the referenced item from the queue
*
* @method remove
* @param item {MIXED} an item in the queue
*/
remove : function (callback) {
var index = this.indexOf(callback);
if (index > -1) {
this._q.splice(index,1);
}
}
});
}, '3.18.1', {"requires": ["yui-base"]});
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| queue-promote-debug.js | File | 1.17 KB | 0777 |
|
| queue-promote-min.js | File | 313 B | 0777 |
|
| queue-promote.js | File | 1.17 KB | 0777 |
|