javascript – 访问Stackoverflow的自动建议标记系统?

前端之家收集整理的这篇文章主要介绍了javascript – 访问Stackoverflow的自动建议标记系统?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有没有办法访问stackoverflow的awesome标签系统?我想借用Stack的真棒自动建议和标签迷你解说盒为我自己的网站.显然,我可以使用jQuery UI自动建议标签,但我也希望也包括酷的小标签描述.如果没有,有人可以告诉我所有这些解释/说明来自哪里,以便我可以实现类似的系统?

解决方法

tageditornew.js

第308行:

$.get("/filter/tags",{q: a,newstyle: !0},"json").done(function(c) {
    C["t_" + a] = c;
    StackExchange.helpers.removeSpinner();
    b(c)
})

这可能会帮助你!

事实证明,

API网址是这样的:

https://stackoverflow.com/filter/tags?q=STRING&newstyle=BOOLEAN

> q – 查询文本.
newstyle – 需要新的风格.结果将在JSON中返回新的样式,其他信息如同义词和摘录.

DEMO:http://jsfiddle.net/DerekL/bXXb7/(使用跨域请求jQuery plguin)

例如:

https://stackoverflow.com/filter/tags?q=htm

会给你:

"html|99829\nhtml5|16359\nxhtml|4143\nhtml-parsing|1461\nhtml-lists|1328\nhtml5-video|949"

其中99829是问题的数量.我花了15分钟的时间查看源代码,找出这个api. -_-”

在新的风格中添加javascript给你这样的:here

[{"Name":"javascript","Synonyms":"classic-javascript|javascript-execution","Count":223223,"Excerpt":"JavaScript is a dynamic language commonly used for scripting in web browsers. It is NOT the same as Java. Use this tag for questions regarding ECMAScript and its dialects/implementations (excluding ActionScript and JScript). If a framework or library,such as jQuery,is used,include that tag as well. Questions that don't include a framework/library tag,implies that the question requires a pure JavaScript answer."},{"Name":"javascript-events","Synonyms":"javascript-event","Count":5707,"Excerpt":"Creating and handling JavaScript events inline in HTML or through a script."},{"Name":"facebook-javascript-sdk","Synonyms":"","Count":992,"Excerpt":"Facebook's JavaScript SDK provides a rich set of client-side functionality for accessing Facebook's server-side API calls. These include all of the features of the REST API,Graph API,and Dialogs."},{"Name":"javascript-library","Count":675,"Excerpt":"A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications,especially for AJAX and other web-centric technologies."},{"Name":"javascript-framework","Count":563,"Excerpt":"A JavaScript framework is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications,{"Name":"unobtrusive-javascript","Count":340,"Excerpt":"Unobtrusive JavaScript is a general approach to the use of JavaScript in web pages."}]

你可以从那里得到什么

>所有标签都以javascript开头>同义词>标签计数>尼斯标签说明

猜你在找的JavaScript相关文章