可以访问Stackoverflow的自动建议标记系统吗?

Tho*_*mas 10 html javascript css ajax stackexchange-api

反正有没有访问stackoverflow的真棒标记系统?我想借用Stack的真棒自动建议和标签迷你解释盒为我自己的网站.显然,我可以使用jQuery UI自动建议标签,但我真的想也包括很酷的小标签描述.如果没有,有人可以告诉我所有这些解释/描述来自哪里,以便我可以实现类似的系统?在此输入图像描述

Der*_*會功夫 15

tageditornew.js

第308行:

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

这可能会帮助你!


事实证明,

API网址是这样的:

https://stackoverflow.com/filter/tags?q=STRING&newstyle=BOOLEAN
  •  q - 查询文字.
  •  newstyle - 是否需要新款式.将使用其他信息(如同义词和摘录)以JSON格式返回新样式的结果.

演示: 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"
Run Code Online (Sandbox Code Playgroud)

99829问题的数量在哪里.我花了15分钟看源代码来找出这个api.-_-"

投入javascript新的风格,使你:这里

[{"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, such as jQuery, 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","Synonyms":"","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","Synonyms":"","Count":563,"Excerpt":"A JavaScript framework 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":"unobtrusive-javascript","Synonyms":"","Count":340,"Excerpt":"Unobtrusive JavaScript is a general approach to the use of JavaScript in web pages."}]

你可以从那里得到什么:

  • 所有标签都以 javascript
  • 同义词
  • 标记计数
  • 好的标签说明