PageSourceSearch

https://jisun.me/js/custom.js

js jisun.me collected 2026-09-28 06:43:36 UTC 3,690 bytes, 102 lines download raw bytes

1$(document).on('click','.navbar-collapse.in',function(e) {
2               if( $(e.target).is('a') ) {
3               $(this).collapse('hide');
4               }
5               });
6
7$(function () {
8  $('#bs-example-navbar-collapse-1').on('shown.bs.collapse', function(e) {
9                                        $('#my_dropdown').dropdown('toggle', 'open').hide();
10                                        console.log('shown:', e);
11                                        });
12  });
13
14
15function spiderjam(mym, myd){
16    document.write("<a href=mailto:"	+ mym + "&#64;" + myd + ">" + mym + "&#64;" + myd + "</a>");
17}
18
19function firefox() {
20    var browser=navigator.userAgent.toLowerCase();
21    if(browser.indexOf('firefox') > -1) {
22        $('#bs-example-navbar-collapse-2').toggle();
23    }
24}
25
26function reset_menus() {
27    sizing($(window).width());
28}
29
30// Take action if the request on URI has internal link '#'
31function internal_link() {
32    var urlArray = window.location.href.split('#');
33    if (urlArray.length == 2 && urlArray[1] != "") {
34        switch (urlArray[1]) {
35            case "intro":        $('#tab-1-content').show(); break;
36            case "news":         $('#tab-2-content').show(); break;
37            case "publications": $('#tab-3-content').show(); break;
38            case "courses":      $('#tab-4-content').show(); break;
39            case "awards":       $('#tab-5-content').show(); break;
40            case "service":      $('#tab-6-content').show(); break;
41            case "contact":      $('#tab-9-content').show(); break;
42            default: break;
43        }
44    }
45}
46
47function sizing(windowWidth) {
48    //alert(windowWidth);
49    if(windowWidth < 1024){ // desktop size
50        $('.twittertop').hide();
51        $('.twitterlow').show();
52    } else {
53        $('.twittertop').show();
54        $('.twitterlow').hide();
55    }
56
57    if(windowWidth <= 480){ // ipad:768, Nexus10:800, 480
58        $('.allshow').hide(); //
59        $('.noshow').show();
60        $('.expandshow').show();
61        $('.collapseshow').hide();
62    } else {
63        $('.allshow').show();
64        $('.noshow').hide();
65        $('.expandshow').hide();
66        $('.collapseshow').hide();
67    }
68}
69
70jQuery(document).ready(function($) {
71                       var windowWidth = $(window).width();
72                       $(window).resize(function(){
73                                        // Check window width has actually changed and it's not just iOS triggering a resize event on scroll
74                                        if ($(window).width() != windowWidth) {
75                                        windowWidth = $(window).width();
76                                        sizing(windowWidth);
77                                        }
78                                        });
79                       sizing(windowWidth);
80                       internal_link();
81                       });
82
83
84// Google Site Search | Search box
85(function() {
86 var cx = '012777421281883581498:r3xp4rmwevw';
87 var gcse = document.createElement('script');
88 gcse.type = 'text/javascript';
89 gcse.async = true;
90 gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
91 '//cse.google.com/cse.js?cx=' + cx;
92 var s = document.getElementsByTagName('script')[0];
93 s.parentNode.insertBefore(gcse, s);
94 })();
95
96// Google Analytics
vendor: 331 bytes, lines 96-101
96
97(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
98 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
99 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
100 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
101ga('create', '
101UA-70658068-1
vendor: 36 bytes, lines 101-102
101', 'auto');
102ga('send', 'pageview');

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.