PageSourceSearch

https://dst.ac.kr/resources/homepage/kor/_Js/common.js

js dst.ac.kr collected 2026-10-02 19:20:54 UTC 1,446 bytes, 38 lines download raw bytes

1$(function() {
2	// ** 전화번호 이메일 패턴 버튼 생성 클래스 생성
3	var tagFootTelGen = new TagRegen( $("#footer-wrap"), "tel" );
4});
5// ** 전화번호 이메일 패턴 버튼 생성 클래스 선언
6function TagRegen( targetGroup, targetType ) {
7	this.targetGroup = targetGroup;
8	this.targetType = targetType;
9	this.init( this.targetGroup, this.targetType );
10}
11TagRegen.prototype.init = function( targetGroup, targetType ) {
12	this.initCast( targetGroup, targetType );
13}
14TagRegen.prototype.initCast = function( tg, tt ) {
15	if ( tt == "tel" ) {
16		var pthStr = /^0\d{1,2}[-.)]\d{3,4}[-.]\d{4}/;
17	} else if ( tt == "mailto" ) {
18		var pthStr = /^[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/;
19	}
20	var lnkInfo = null;
21	$("*", tg ).each( function( index, item ) {
22		var thisTxt = util.frontEndTrimming( $(this).text() );
23		if ( pthStr.test( thisTxt ) === true ) {
24			if ( tt == "tel" ) {
25				if ( thisTxt.indexOf("~") > -1 ) {
26					lnkInfo = util.getNumberOnly( thisTxt.split("~")[0] );
27				} else if ( thisTxt.indexOf(",") > -1 ) {
28					lnkInfo = util.getNumberOnly( thisTxt.split(",")[0] );
29				} else {
30					lnkInfo = util.getNumberOnly( thisTxt );
31				}
32			} else if ( tt == "mailto" ) {
33				lnkInfo = thisTxt;
34			}
35			$(this).html( "<span class='str'>" + thisTxt + "</span><a href='" + tt + ":" + lnkInfo + "' class='lnk'>" + thisTxt + "</a>" );
36		}
37	});
38}

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.