Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

Parser.js

Zuletzt modifiziert: 02.04.2025, 15:04 - Dateigröße: 1.52 KiB


01  matches.forEach(function(m)
02  {
03      // Linkify the trimmed URL
04      linkifyUrl(m[0][1], trimUrl(m[0][0]));
05  });
06   
07  /**
08  * Linkify given URL at given position
09  *
10  * @param {number} tagPos URL's position in the text
11  * @param {string} url    URL
12  */
13  function linkifyUrl(tagPos, url)
14  {
15      // Create a zero-width end tag right after the URL
16      var endPos = tagPos + url.length,
17          endTag = addEndTag(config.tagName, endPos, 0);
18   
19      // If the URL starts with "www." we prepend "http://"
20      if (url[3] === '.')
21      {
22          url = 'http://' + url;
23      }
24   
25      // Create a zero-width start tag right before the URL, with a slightly worse priority to
26      // allow specialized plugins to use the URL instead
27      var startTag = addStartTag(config.tagName, tagPos, 0, 1);
28      startTag.setAttribute(config.attrName, url);
29   
30      // Pair the tags together
31      startTag.pairWith(endTag);
32   
33      // Protect the tag's content from partial replacements with a low priority tag
34      var contentTag = addVerbatim(tagPos, endPos - tagPos, 1000);
35      startTag.cascadeInvalidationTo(contentTag);
36  }
37   
38  /**
39  * Remove trailing punctuation from given URL
40  *
41  * We remove most ASCII non-letters from the end of the string.
42  * Exceptions:
43  *  - dashes and underscores, (base64 IDs could end with one)
44  *  - equal signs, (because of "foo?bar=")
45  *  - plus signs, (used by some file share services to force download)
46  *  - trailing slashes,
47  *  - closing parentheses. (they are balanced separately)
48  *
49  * @param  {string} url Original URL
50  * @return {string}     Trimmed URL
51  */
52  function trimUrl(url)
53  {
54      return url.replace(/(?:(?![-=+)\/_])[\s!-.:-@[-`{-~])+$/, '');
55  }