How can I find a specific script in my JSFiddle?

I really like JSFiddleit and I used it a lot.

At this moment, I have about 80 scripts that I created / unlocked in my JSFiddle dashboard. I have to go through 8 pages to look for a specific script , using my eyes to scan each heading.

enter image description here


I can be doable since I have only 80 scripts, but what if I have 500 or 2000 scripts by next year? It will make me look forever, although every headline is with my eyes. I am looking for a better way to handle this.

Is there a way to search for a specific violin without having to go through the entire pagination and view each title?

Any advice on this would be greatly appreciated.

+4
source share
1 answer

I had the same problem as you, so I created a fiddle to search my list of scripts :)

http://jsfiddle.net/panzerkunst/77fgau53/show/

It uses the JSFiddle API to return a list of scripts

$.ajax(
        {
            url: "http://jsfiddle.net/api/user/"+this.username+"/demo/list.json",
            data: {
                limit:this.limit
            },
            dataType: "JSONP",
            jsonp: "jsoncallback",
            type: "GET"
        }
    )
    .done(this.dataReceived.bind(this))
    .fail(this.errorHappened.bind(this))
    .always(this.resetControls.bind(this));

and then the list is filtered based on the keyword that you provide.

dataReceived: function(data){
    var query = this.query;
    var filtered = _.filter(data.list, function(item){if(item.title.contains(query) || item.description.contains(query)){ return item}});

    [...]
}

Hope this helps!

Nicholas

UPDATE : to make it work with your scripts, you need to change the username passed to the .initialize () method. http://jsfiddle.net/panzerkunst/77fgau53/

+2
source

All Articles