PageSourceSearch

https://www.chessmoving.com.au/blogs/Javascript/Blogs.js

js chessmoving.com.au collected 2026-09-30 05:41:44 UTC 1,553 bytes, 32 lines download raw bytes

1/* #########################################################################
2   ##
3   ##  Blogs Module - Internal Module Javascript
4   ##
5   ##  Available to all module templates but not elsewhere in the website.
6   ##
7   ######################################################################### */
8
9// Turns a comma separated list of category names into a comma separated list
10// of links to category pages using standard blogs module URLs.
11function DisplayCategories(strBlogId,strCategories) {
12    strCategoriesLinks = "";
13    arrCategories = strCategories.split(",");
14    for (var i = 0; i < arrCategories.length; i++) {
15        arrCategories[i] = Trim(arrCategories[i]);
16        if (strCategoriesLinks != "") {
17            strCategoriesLinks += ", ";
18        }
19        strCategory = arrCategories[i].replace(" ", "-"); // Only replaces the first space. Needs a regex?
20        strCategoriesLinks += '<a href="/blogs/' + strBlogId + '/category/' + strCategory + '.aspx">' + arrCategories[i] + '</a>';
21    }
22    return strCategoriesLinks;
23}
24
25// Update the HTML content of the categories element (expected to be a comma
26// separated list of category names) with robust degradation in case the
27// browser doesn't support innerHTML.
28function DisplayCategoriesElement(strBlogId, strCategories, strElementId) {
29    if (document.getElementById(strElementId) && document.getElementById(strElementId).innerHTML) {
30        document.getElementById(strElementId).innerHTML = DisplayCategories(strBlogId, strCategories);
31    }
32}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.