UNPKG

nhentai-api-tiffceet-patch

Version:
1,915 lines (570 loc) 33.5 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Class: API | nhentai-api</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/tui-doc.css"> </head> <body> <nav class="lnb" id="lnb"> <div class="logo" style="width: 65px; height: 13px"> <a href="index.html" rel="noopener noreferrer" target="_blank"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCA1Ij48dGV4dCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjAiIHk9IjEwMCUiIGZpbGw9IndoaXRlIiB0ZXh0TGVuZ3RoPSIzMCIgZm9udC1zaXplPSI1IiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgc3R5bGU9InRleHQtdHJhbnNmb3JtOnVwcGVyY2FzZSI+bmhlbnRhaS1hcGk8L3RleHQ+PC9zdmc+" width="100%" height="100%"> </a> </div> <div class="title"> <h1><a href="index.html" class="link">nhentai-api</a></h1> <span class="version">v3.0.2</span> </div> <div class="search-container" id="search-container"> <input type="text" placeholder="Search"> <ul></ul> </div> <div class="lnb-api hidden"><h3>Modules</h3><ul><li><a href="module-API.html">API</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:API_sub"><div class="member-type">Typedef</div><ul class="inner"><li><a href="module-API.html#~APIArgs">APIArgs</a></li></ul></div></li><li><a href="module-Book.html">Book</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Book_sub"><div class="member-type">Typedef</div><ul class="inner"><li><a href="module-Book.html#~BookTitle">BookTitle</a></li></ul></div></li><li><a href="module-Image.html">Image</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Image_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Image.html#~known">known</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-Image.html#~get">get</a></li></ul><div class="member-type">Typedef</div><ul class="inner"><li><a href="module-Image.html#~ImageTypes">ImageTypes</a></li></ul></div></li><li><a href="module-Search.html">Search</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Search_sub"></div></li><li><a href="module-Tag.html">Tag</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Tag_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Tag.html#~known">known</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-Tag.html#~get">get</a></li></ul><div class="member-type">Typedef</div><ul class="inner"><li><a href="module-Tag.html#~TagTypes">TagTypes</a></li></ul></div></li></ul></div><div class="lnb-api hidden"><h3>Classes</h3><ul><li><a href="module-API-API.html">API</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:API~API_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-API-API.html#APIPath">APIPath</a></li><li><a href="module-API-API.html#net">net</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-API-API.html#getAPIArgs">getAPIArgs</a></li><li><a href="module-API-API.html#getBook">getBook</a></li><li><a href="module-API-API.html#getImageURL">getImageURL</a></li><li><a href="module-API-API.html#getThumbURL">getThumbURL</a></li><li><a href="module-API-API.html#request">request</a></li><li><a href="module-API-API.html#search">search</a></li><li><a href="module-API-API.html#searchAlike">searchAlike</a></li><li><a href="module-API-API.html#searchTagged">searchTagged</a></li></ul></div></li><li><a href="module-API-APIPath.html">APIPath</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:API~APIPath_sub"><div class="member-type">Methods</div><ul class="inner"><li><a href="module-API-APIPath.html#.book">book</a></li><li><a href="module-API-APIPath.html#.bookCover">bookCover</a></li><li><a href="module-API-APIPath.html#.bookPage">bookPage</a></li><li><a href="module-API-APIPath.html#.bookThumb">bookThumb</a></li><li><a href="module-API-APIPath.html#.search">search</a></li><li><a href="module-API-APIPath.html#.searchAlike">searchAlike</a></li><li><a href="module-API-APIPath.html#.searchTagged">searchTagged</a></li></ul></div></li><li><a href="module-Book-Book.html">Book</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Book~Book_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Book-Book.html#cover">cover</a></li><li><a href="module-Book-Book.html#favorites">favorites</a></li><li><a href="module-Book-Book.html#id">id</a></li><li><a href="module-Book-Book.html#isKnown">isKnown</a></li><li><a href="module-Book-Book.html#media">media</a></li><li><a href="module-Book-Book.html#pages">pages</a></li><li><a href="module-Book-Book.html#scanlator">scanlator</a></li><li><a href="module-Book-Book.html#tags">tags</a></li><li><a href="module-Book-Book.html#title">title</a></li><li><a href="module-Book-Book.html#Unknown">Unknown</a></li><li><a href="module-Book-Book.html#UnknownBook">UnknownBook</a></li><li><a href="module-Book-Book.html#uploaded">uploaded</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-Book-Book.html#.parse">parse</a></li><li><a href="module-Book-Book.html#hasTag">hasTag</a></li><li><a href="module-Book-Book.html#hasTagWith">hasTagWith</a></li><li><a href="module-Book-Book.html#pushPage">pushPage</a></li><li><a href="module-Book-Book.html#pushTag">pushTag</a></li><li><a href="module-Book-Book.html#setCover">setCover</a></li></ul></div></li><li><a href="module-Book-UnknownBook.html">UnknownBook</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Book~UnknownBook_sub"></div></li><li><a href="module-Image-Image.html">Image</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Image~Image_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Image-Image.html#book">book</a></li><li><a href="module-Image-Image.html#filename">filename</a></li><li><a href="module-Image-Image.html#height">height</a></li><li><a href="module-Image-Image.html#id">id</a></li><li><a href="module-Image-Image.html#isCover">isCover</a></li><li><a href="module-Image-Image.html#type">type</a></li><li><a href="module-Image-Image.html#types">types</a></li><li><a href="module-Image-Image.html#width">width</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-Image-Image.html#.parse">parse</a></li></ul></div></li><li><a href="module-Image-ImageType.html">ImageType</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Image~ImageType_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Image-ImageType.html#extension">extension</a></li><li><a href="module-Image-ImageType.html#isKnown">isKnown</a></li><li><a href="module-Image-ImageType.html#knownTypes">knownTypes</a></li><li><a href="module-Image-ImageType.html#type">type</a></li></ul></div></li><li><a href="module-Image-UnknownImageType.html">UnknownImageType</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Image~UnknownImageType_sub"></div></li><li><a href="module-Search-Search.html">Search</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Search~Search_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Search-Search.html#books">books</a></li><li><a href="module-Search-Search.html#page">page</a></li><li><a href="module-Search-Search.html#pages">pages</a></li><li><a href="module-Search-Search.html#perPage">perPage</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-Search-Search.html#.parse">parse</a></li><li><a href="module-Search-Search.html#pushBook">pushBook</a></li></ul></div></li><li><a href="module-Tag-Tag.html">Tag</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Tag~Tag_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Tag-Tag.html#types">types</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-Tag-Tag.html#.get">get</a></li><li><a href="module-Tag-Tag.html#compare">compare</a></li></ul></div></li><li><a href="module-Tag-TagType.html">TagType</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Tag~TagType_sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-Tag-TagType.html#isKnown">isKnown</a></li><li><a href="module-Tag-TagType.html#knownTypes">knownTypes</a></li><li><a href="module-Tag-TagType.html#type">type</a></li></ul></div></li><li><a href="module-Tag-UnknownTagType.html">UnknownTagType</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:Tag~UnknownTagType_sub"></div></li></ul></div><div class="lnb-api hidden"><h3>Global</h3><ul><li class="hidden"><a href="global.html#APIBook">APIBook</a></li><li class="hidden"><a href="global.html#APIImage">APIImage</a></li><li class="hidden"><a href="global.html#APISearch">APISearch</a></li><li class="hidden"><a href="global.html#APITag">APITag</a></li><li class="hidden"><a href="global.html#httpAgent">httpAgent</a></li><li class="hidden"><a href="global.html#nHentaiHosts">nHentaiHosts</a></li><li class="hidden"><a href="global.html#nHentaiOptions">nHentaiOptions</a></li><li><a href="global.html#processOptions">processOptions</a></li></ul></div> </nav> <div id="resizer"></div> <div class="main" id="main"> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span> <span class="ancestors"><a href="module-API.html">API</a>~</span>API<span class="signature">(options)</span><span class="type-signature"></span></h2> <div class="class-description"><p>Class used for interaction with nHentai API.</p></div> </header> <article> <div class="container-overview"> <dt> <h4 class="name" id="API"> new <span class="type-signature"></span>API<span class="signature">(options)</span><span class="type-signature"></span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line117">line 117</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Applies provided options on top of defaults.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type"><a href="global.html#nHentaiOptions">nHentaiOptions</a></span> </td> <td class="description last"><p>Options to apply.</p></td> </tr> </tbody> </table> </div> <dl class="details"> </dl> </dd> </div> <h3 class="subsection-title">Members</h3> <dl> <dt> <h4 class="name" id="APIPath"> <span class="type-signature"><span class="icon green">private</span> </span>APIPath<span class="type-signature"> :APIPath</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line111">line 111</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>API path class</p> </div> <!-- <h5>Type:</h5> <ul> <li> <span class="param-type">APIPath</span> </li> </ul> --> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="net"> <span class="type-signature"></span>net<span class="type-signature"> :https|http</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line127">line 127</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Get http(s) module depending on <code>options.ssl</code>.</p> </div> <!-- <h5>Type:</h5> <ul> <li> <span class="param-type">https</span> | <span class="param-type">http</span> </li> </ul> --> <dl class="details"> </dl> </dd> </dl> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name" id="getAPIArgs"> <span class="type-signature"><span class="icon green">private</span> </span>getAPIArgs<span class="signature">(hostType, api)</span><span class="type-signature"> &rarr; {APIArgs}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line192">line 192</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Get API arguments. This is internal method.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>hostType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Host type.</p></td> </tr> <tr> <td class="name"><code>api</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Endpoint type.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">APIArgs</span> - <p>API arguments.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="getBook"> <span class="type-signature"><span class="icon green">async</span> </span>getBook<span class="signature">(bookID)</span><span class="type-signature"> &rarr; {Promise.&lt;Book>}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line284">line 284</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Get book by id.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>bookID</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Book ID.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">Promise.&lt;Book></span> - <p>Book instance.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="getImageURL"> <span class="type-signature"></span>getImageURL<span class="signature">(image)</span><span class="type-signature"> &rarr; {string}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line300">line 300</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Get image URL.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>image</code></td> <td class="type"> <span class="param-type">Image</span> </td> <td class="description last"><p>Image.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">string</span> - <p>Image URL.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="getThumbURL"> <span class="type-signature"></span>getThumbURL<span class="signature">(image)</span><span class="type-signature"> &rarr; {string}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line318">line 318</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Get image thumbnail URL.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>image</code></td> <td class="type"> <span class="param-type">Image</span> </td> <td class="description last"><p>Image.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">string</span> - <p>Image thumbnail URL.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="request"> <span class="type-signature"></span>request<span class="signature">(options)</span><span class="type-signature"> &rarr; {Promise.&lt;object>}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line140">line 140</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>JSON get request.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>HTTP(S) request options.</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>host</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Host.</p></td> </tr> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Path.</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">Promise.&lt;object></span> - <p>Parsed JSON.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="search"> <span class="type-signature"><span class="icon green">async</span> </span>search<span class="signature">(query, page<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Search>}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line217">line 217</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Search by query.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>query</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>Query.</p></td> </tr> <tr> <td class="name"><code>page</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> 1 </td> <td class="description last"><p>Page ID.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">Promise.&lt;Search></span> - <p>Search instance.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="searchAlike"> <span class="type-signature"><span class="icon green">async</span> </span>searchAlike<span class="signature">(book)</span><span class="type-signature"> &rarr; {Promise.&lt;Search>}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line237">line 237</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Search related books.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>book</code></td> <td class="type"> <span class="param-type">number</span> | <span class="param-type">Book</span> </td> <td class="description last"><p>Book instance or Book ID.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">Promise.&lt;Search></span> - <p>Search instance.</p> </div> <dl class="details"> </dl> </dd> <dt> <h4 class="name" id="searchTagged"> <span class="type-signature"><span class="icon green">async</span> </span>searchTagged<span class="signature">(tag, page<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Search>}</span> <div class="container-source members"> <code><a href="api.js.html">api.js</a></code>, <code><a href="api.js.html#line259">line 259</a></code> </div> </h4> </dt> <dd> <div class="description"> <p>Search by tag id.</p> </div> <div class="container-params"> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>tag</code></td> <td class="type"> <span class="param-type">number</span> | <span class="param-type">Tag</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>Tag or Tag ID.</p></td> </tr> <tr> <td class="name"><code>page</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> 1 </td> <td class="description last"><p>Page ID.</p></td> </tr> </tbody> </table> </div> <div class="container-returns"> <h5>Returns:</h5> <span class="param-type">Promise.&lt;Search></span> - <p>Search instance.</p> </div> <dl class="details"> </dl> </dd> </dl> </article> </section> </div> <footer> <img class="logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCA1Ij48dGV4dCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjAiIHk9IjEwMCUiIGZpbGw9IndoaXRlIiB0ZXh0TGVuZ3RoPSIzMCIgZm9udC1zaXplPSI1IiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgc3R5bGU9InRleHQtdHJhbnNmb3JtOnVwcGVyY2FzZSI+bmhlbnRhaS1hcGk8L3RleHQ+PC9zdmc+" style="width: 65px; height: 13px"> <div class="footer-text">nhentai-api</div> </footer> <script>prettyPrint();</script> <script src="scripts/jquery.min.js"></script> <script src="scripts/tui-doc.js"></script> <script src="scripts/linenumber.js"></script> <script> var id = 'module:API~API_sub'.replace(/"/g, '_'); var selectedApi = document.getElementById(id); // do not use jquery selector var $selectedApi = $(selectedApi); $selectedApi.removeClass('hidden'); $selectedApi.parent().find('.glyphicon').removeClass('glyphicon-plus').addClass('glyphicon-minus'); showLnbApi(); </script> </body> </html>