• forked:石巻市 データセット一覧
Import an externally hosted application
Check style

  • JavaScript
  • CSS
  • HTML
  • Images
  • Input Data
  • ReadMe
  • forked:石巻市 データセット一覧
  • jquery-1.11.2.min.js  
  •  
  • history

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 
window.onload = function() {
    var keyword = getParameterFromURL("subject"); // obtain keyword from the URL "?subject="
    // Work loop
    $.each(LinkData.getWorks(), function(workKey, workValue) {
        // File loop
        $.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
            var hit = ""; // list of subjects whose URI matches keyword
            var nHit = 0; // number of subjects whose URI matches keyword
            var i = 1;
            var hotText;
            var set;
            // Subject loop
            $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
                $.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
                    list = "";
                    $.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) {
                        if(propValue == "http://linkdata.org/property/rdf1s3986i#%E5%8C%BA%E5%88%86"){
                            myTBL.rows[i].cells[0].innerText = objValue;
                        }else if(propValue == "http://linkdata.org/property/rdf1s3986i#%E3%83%87%E3%83%BC%E3%82%BF%E3%82%BB%E3%83%83%E3%83%88%E3%81%AE%E5%90%8D%E7%A7%B0"){
                            myTBL.rows[i].cells[1].innerText = objValue;
                        }else if(propValue == "http://linkdata.org/property/rdf1s3986i#%E3%83%87%E3%83%BC%E3%82%BF%E3%82%BB%E3%83%83%E3%83%88%E3%81%AE%EF%BC%B5%EF%BC%B2%EF%BC%AC"){
                            hotText = objValue;
                            set = objValue;
                            myTBL.rows[i].cells[2].innerHTML = hotText.link(hotText);
                        }else if(propValue == "http://linkdata.org/property/rdf1s3986i#%E8%AA%AC%E6%98%8E"){
                            myTBL.rows[i].cells[3].innerText = objValue;
                        }
                    });
                });
                i++;
            });
        });
    });
window.find(highlight);
};
 
// Get a parameter value in URL (e.g. ?paramString=value )
function getParameterFromURL( paramString )
{           
    var value = "";
    var topWindow = top.window.location.search;
    if( topWindow ){
        var q = decodeURIComponent(topWindow.substring(1,topWindow.length)).split("&");
        for ( var i = 0; i < q.length; i++ ){
            var r = q[i].split("=");
            if ( r[0] ==  paramString )
                value = r[1];
        }
    }
    return value;
}
 
// Highlight keyword in the string
function highlight( string, keyword )
{
    if ( keyword.length > 0 ) {
        var ss = string.split(keyword);
        var len = ss.length;
        if ( len > 1 ) {
            string = ss[0];
            for ( i = 1; i < len; i++ )
//              string += "<font color=\"red\">"+keyword+"</font>"+ss[i];
                string += "<span class=\"highlight\">"+keyword+"</span>"+ss[i];
        }
    }
    return string;
}
 
// get the last name of the string separated with # and /
function getLastName( string )
{
    string = decodeURIComponent(string);
    var sharp = string.split("#");
    var slash = sharp[sharp.length-1].split("/");
    var lastName = slash[slash.length-1];
    return lastName;
}
 
// return a link to Google map search
function addLinkToMap( latitude, longitude )
{
    var s = "<br><a target=\"_blank\" href=\"http://www.google.com/maps/?q=" + latitude + "," + longitude + "\">Show map</a>";
    return s;
}
 
// shortening URL e.g. http://.../123.jpg
function shortenURL( url )
{
    url = decodeURIComponent(url);
    var slash = url.split("/");
    var lastName = slash[slash.length-1];
    return url.split(":")[0]+"://.../"+lastName;
}
 
jquery-1.11.2.min.js
Playing...

jquery-1.11.2.min.js