mozilla
Your Search Results

    Template:bugtest

    <%
    // TEST TEMPLATE to see if we can get the tooltip back
    var bugPageURL = 'https://bugzilla.mozilla.org/show_bug.cgi?id=' + $0;
    var s = "";
    var style = "";
    var desc = "";
    
    var bugPageXML = mdn.fetchHTTPResource(bugPageURL);
    
    if (bugPageXML) {
        var re = /<title>(.+)<\/title>/i;
        var found = bugPageXML.match(re);
        
        if (!found || !found.length) {
            desc = "Error accessing Bugzilla. Try again!";
        } else {
            if (found[1] == "Access Denied") {
                desc = "This is a security-related bug; you must log into Bugzilla to see details.";
            } else if (found[1] == "Missing Bug ID") {
                desc = "Bug not found.";
            } else {            
              re = /<span id="static_bug_status">(.+)\s/i;
              found = bugPageXML.match(re);
        
              if (!found || !found.length) {
                  desc = "Unable to find details about this bug.";
              } else {
                  s = found[1];
                  if (s == "RESOLVED") {
                      style = "class='bug-resolved'"
                  }
            
                  // Get summary
            
                  re = /<span id="short_desc_nonedit_display">(.+)<\/span>/i;
                  found = bugPageXML.match(re);
            
                  if (!found || !found.length) {
                      desc = "Unable to fetch bug description.";
                  } else {
                      desc = found[1];
                  }
              }
            }
        }
    } else {
        desc = "Unable to access the bug's page. Try reloading this page; it's also possible the bug is a security issue and is only visible to a few people.";
    }
    
    var s_bug = mdn.localString({
        "en-US": "bug",
        "ca"   : "errada",
        "cs"   : "chyba",
        "ja"   : "バグ",
        "pl"   : "błąd",
        "de"   : "Bug"
    });
    
    %><a rel="external" <%=style%> href="<%=bugPageURL%>" title="<%=desc%>"><%=s_bug%>&nbsp;<%=$0%></a>
    Search for pages that use Template:bugtest to see example use cases and how many pages use this macro.

    Document Tags and Contributors

    Contributors to this page: Sheppy, SJW, ethertank
    Last updated by: SJW,