diff --git a/nyaa/static/js/main.js b/nyaa/static/js/main.js index 2e5a709..c7d9cb8 100644 --- a/nyaa/static/js/main.js +++ b/nyaa/static/js/main.js @@ -180,9 +180,9 @@ document.addEventListener("DOMContentLoaded", function() { // Render markdown from elements with "markdown-text" attribute document.addEventListener("DOMContentLoaded", function() { - var markdownTargets = document.querySelectorAll('[markdown-text]'); - for (var target of markdownTargets) { + for (var i = 0; i < markdownTargets.length; i++) { + var target = markdownTargets[i]; var rendered = markdown.render(target.innerHTML); target.innerHTML = rendered; } diff --git a/nyaa/templates/help.html b/nyaa/templates/help.html index f5d021b..1d3e5af 100644 --- a/nyaa/templates/help.html +++ b/nyaa/templates/help.html @@ -9,14 +9,14 @@

Using the Site

{{ linkable_header("How to Download", "how-to-dl") }} -

+

This site only offers torrent files and magnet links. To download the content of the torrents, you will have to use a BitTorrent client such as qBitTorrent, µTorrent, Transmission or Deluge. -

+
{{ linkable_header("Torrent Colors", "torrent-colors") }} -

+

Green entries (trusted) are:
{{ linkable_header("Using the Search Engine", "using-search") }} -

+

Search results can be filtered by category, remake, trusted, and users. The results can be further sorted by size, date, seeders, leechers, completed count, and comment count. -

-

+

+
You can combine search terms with the | operator, such as horrible|cartel. -

-

+

+
To exclude results matching a certain word, prefix them with -, e.g. FFF -memesubs, which will return torrents with FFF in the name, but not those which have memesubs in the name as well. -

-

+

+
If you want to search for a several-word expression in its entirety, you can surround searches with " (double quotes), such as "foo bar", which would match torrents named foo bar but not those named bar foo. -

-

+

+
You can also use ( and ) to signify precedence. -

+
{{ linkable_header("Reporting Torrents", "reporting") }} -

+

If you find a torrent that breaks the rules, click the button to the right of the torrent's information page. Then, enter a reason for your report in the dialog that opens, and hit the button to confirm. -

+
{{ linkable_header("Styling Descriptions and Comments", "styling") }} -

+

You can style your comments and your torrent's description using Markdown. This includes adding images or linking to external websites. -

-

+

+
To link to an external site, use [label](https://example.com) where the text in the [] square brackets is the shown text of your link, and the URL in the () parentheses is the URL your link will point to. -

-

+

+
Embedding an image is similar. Use ![alt text](https://example.com/image.jpg) to have an image embedded in your comment or description. Note the ! exclamation mark at the beginning, denoting that this link is an image. -

+
{#

Help

The search engine is located at the top right, and it allows users to search through the torrent titles available on the site. Results matching either word A or B can be included by typing a vertical bar between them (|). Results matching a certain word can be excluded by prefixing that word with a hyphen-minus (-). Phrases can be matched by surrounding them with double-quotes (). Search results can be filtered by category, remake, trusted, and/or A+ status, and then narrowed down further by age and size ranges as well as excluding specific users. Sorting can be done in ascending or descending order by date, amount of seeders/leechers/downloads, size, or name. The search engine adapts to the current view and makes it possible to search for specific torrents in a specific subcategory from a specific user.

diff --git a/nyaa/templates/layout.html b/nyaa/templates/layout.html index 8e7f155..e42c97b 100644 --- a/nyaa/templates/layout.html +++ b/nyaa/templates/layout.html @@ -66,7 +66,7 @@ {{ config.SITE_NAME }} -
+ {% set search_username = (user.username + ("'" if user.username[-1] == 's' else "'s")) if user_page else None %} {% set search_placeholder = 'Search {} torrents...'.format(search_username) if user_page else 'Search...' %} - + + {% if user_page %}