PageSourceSearch

https://www.shinetsusilicone-global.com/js/jquery.fontSize.js

js shinetsusilicone-global.com collected 2026-10-02 10:50:39 UTC 2,257 bytes, 81 lines download raw bytes

1/*
2jQuery FontSize Plugin v1.0
3
4The MIT License
5
6Copyright (c) 2013 ks-product.com
7
8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included in
16all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24THE SOFTWARE.
25
26*/
27
28
29(function($){
30	$.fn.fontSize = function(options) {
31		
32		var defaultState = "medium"
33		var keyName = "state";
34		
35		var defaults = { "data" : [
36			{
37				"target" : "body",
38				"size" : { "small":"12px", "medium":"13px", "large":"16px" }
39			}
40		]};
41		var setting = $.extend( defaults, options );
42		
43		var html = '';
44		var state;
45		var self = this;
46		
47		$(self).append(html);
48	
49		if(!(state = $.cookie(keyName))){
50			state = defaultState;
51		}
52		
53		$("#j-font-size-"+state).addClass("active");
54		setFontSize(state);
55
56				
57		$("#j-font-size>div").click(function(e){
58			var state = $(this).attr("id").replace("j-font-size-","");
59			
60			setFontSize(state);
61			
62			$("#j-font-size>div").removeClass("active");
63			$(this).addClass("active");
64						
65			$.cookie(keyName,state,{expires : 365, path : '/'});
66			
67		});
68		
69		function setFontSize(state){
70			var data = setting["data"];
71					
72			for(var i = 0; i < data.length; i++){
73				var target = data[i]["target"];
74				var size = data[i]["size"];
75				
76				$(target).css("font-size",size[state]);
77				
78			}
79		}
80	}
81})(jQuery);

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.