PageSourceSearch

https://www.hyugacity.jp/reiki_new/js/ipad.js

js hyugacity.jp collected 2026-10-02 16:16:50 UTC 1,767 bytes, 59 lines download raw bytes

1var wOpenFlag = false;
2function iPadLoadStyle(){
3	window.iPad = (/iPad/.test(navigator.userAgent) || navigator.userAgent.toLowerCase().indexOf("macintosh") > -1 && "ontouchend" in document);
4	window.iPhone = /iPhone/.test(navigator.userAgent);
5	window.Android = /Android/.test(navigator.userAgent);
6	window.goodreader = /goodreader/.test(location.href);
7	if(iPad || iPhone || Android){
8		var args = arguments,
9		d = document,
10		head = d.getElementsByTagName('head'),
11		linktag = function(h,m){
12			var tag = d.createElement("link");
13			tag.href = h;
14			tag.media = m;
15			tag.type = "text/css";
16			tag.rel = "stylesheet";
17			return tag;
18		};
19		//common
20		if(args[0]) head.item(0).appendChild(linktag(args[0],""));
21		//landscape
22		if(args[1]) head.item(0).appendChild(linktag(args[1],"all and (orientation:landscape)"));
23		//portrait
24		if(args[2]) head.item(0).appendChild(linktag(args[2],"all and (orientation:portrait)"));
25		
26		if(iPad || iPhone) {
27			wOpenFlag = true;
28		}
29		
30	}
31
32};
33
34//reiki.jsクラスのquoteFunctionを上書き
35function quoteFunction(w_name) {
36	if (wOpenFlag) {
37		// iPad、iPhoneの場合、何もしない
38	} else {
39		window.open('', w_name);
40	}
41}
42
43//#3624 iPad対応(タブレット用HTML作成)
44window.onload = function (){
45	// iPad上でGoodreaderを使ってる場合のみ処理を行う
46	if(iPad && goodreader){
47		// target属性を持つタグで繰り返し処理
48		$('[target]').each(function (){
49			// target属性を削除
50			$(this).removeAttr('target');
51		});
52	
53		// 「window.open」で始まるonClick属性を持つタグで繰り返し処理
54		$('[onClick^=\'window.open\']').each(function (){
55			// target属性を削除
56			$(this).removeAttr('onClick');
57		});
58	}
59}

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.