-
Notifications
You must be signed in to change notification settings - Fork 0
/
my-setting.js
91 lines (81 loc) · 1.56 KB
/
my-setting.js
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
jQuery(function($){
var my = $.mysetting;
try{
(function(){
var social_btn_link = $(my.social_btn_link);
if(social_btn_link.size()){
var param = {};
var social_button = [
'hatebu',
'facebook',
'twitter',
'googleplus'
];
var found = false;
$.each(social_button,function(idx){
var name = social_button[idx];
var no = my[name+'_sort'];
if(!no){
param[name] = false;
}
else{
found = true;
param[name] = {sort:no};
}
});
if(found){
if(my.social_btn_area) param.appendTo = my.social_btn_area;
if(my.social_large_btn == '1') param.size = 'large';
social_btn_link.socialButtons(param);
}
}
})();
}
catch(e){
}
try{
if(my.prettify == '1'){
$('pre').each(function(){
$(this)[0].className || $(this).addClass('prettyprint linenums');
});
prettyPrint();
}
}
catch(e){
}
try{
if(my.google_search_id != ''){
if(my.google_search_replace == '1'){
$('<div class="google-search"/>').insertAfter('#searchform').googleCustomSearch({
cx : my.google_search_id
});
$('#searchform').remove();
}
else
if(my.google_search_area){
$(my.google_search_area).googleCustomSearch({
cx : my.google_search_id
});
}
}
}
catch(e){
}
try{
if(my.hatebu_users == '1'){
$($.mysetting.hatebu_users_code || 'a').each(function(){
var target = $(this);
target.find('> *').size() || target.hatebuUsers();
})
}
}
catch(e){
}
try{
if(my.external == '1'){
$('a').external();
}
}
catch(e){
}
});