oulu-rails 0.7.6 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/oulu-rails/version.rb +1 -1
  3. data/vendor/assets/stylesheets/_oulu-base.sass +1 -1
  4. data/vendor/assets/stylesheets/settings/initializers/_reset.sass +0 -38
  5. data/vendor/assets/stylesheets/settings/initializers/_sanitize.sass +262 -0
  6. metadata +3 -40
  7. data/vendor/assets/javascripts/oulu-ie8.js +0 -6
  8. data/vendor/assets/javascripts/oulu-ie9.js +0 -2
  9. data/vendor/assets/javascripts/oulu.js +0 -2
  10. data/vendor/assets/javascripts/oulu/helpers/js-autosize.js.coffee +0 -2
  11. data/vendor/assets/javascripts/oulu/helpers/js-checkbox.js.coffee +0 -6
  12. data/vendor/assets/javascripts/oulu/helpers/js-click-animate.js.coffee +0 -8
  13. data/vendor/assets/javascripts/oulu/helpers/js-delay-hidden.js.coffee +0 -4
  14. data/vendor/assets/javascripts/oulu/helpers/js-focused.js.coffee +0 -7
  15. data/vendor/assets/javascripts/oulu/helpers/js-hack.js.coffee +0 -8
  16. data/vendor/assets/javascripts/oulu/helpers/js-hide-after.j.coffee +0 -5
  17. data/vendor/assets/javascripts/oulu/helpers/js-hover-z-index.js.coffee +0 -5
  18. data/vendor/assets/javascripts/oulu/helpers/js-hovered.js.coffee +0 -17
  19. data/vendor/assets/javascripts/oulu/helpers/js-one-animate.js.coffee +0 -5
  20. data/vendor/assets/javascripts/oulu/helpers/js-open-children.js.coffee +0 -28
  21. data/vendor/assets/javascripts/oulu/helpers/js-open.js.coffee +0 -51
  22. data/vendor/assets/javascripts/oulu/helpers/js-scroll-to-top.js.coffee +0 -11
  23. data/vendor/assets/javascripts/oulu/helpers/js-scroll.js.coffee +0 -9
  24. data/vendor/assets/javascripts/oulu/helpers/js-side-slide.js.coffee +0 -6
  25. data/vendor/assets/javascripts/oulu/helpers/js-window-loading.js.coffee +0 -15
  26. data/vendor/assets/javascripts/oulu/helpers/js-window-sizes.js.coffee +0 -6
  27. data/vendor/assets/javascripts/oulu/helpers/open-close.js.coffee +0 -23
  28. data/vendor/assets/javascripts/oulu/ie/PIE_IE678.js +0 -72
  29. data/vendor/assets/javascripts/oulu/ie/PIE_IE9.js +0 -46
  30. data/vendor/assets/javascripts/oulu/ie/ie-selectors.js.coffee +0 -3
  31. data/vendor/assets/javascripts/oulu/ie/ie8-selectors.js.coffee +0 -3
  32. data/vendor/assets/javascripts/oulu/ie/ie9-selectors.js.coffee +0 -6
  33. data/vendor/assets/javascripts/oulu/ie/jquery.belatedPNG.min.js +0 -29
  34. data/vendor/assets/javascripts/oulu/ie/jquery.linkscubber.js +0 -7
  35. data/vendor/assets/javascripts/oulu/ie/svgeezy.min.js +0 -12
  36. data/vendor/assets/javascripts/oulu/plugins/check-box.js.coffee +0 -34
  37. data/vendor/assets/javascripts/oulu/plugins/footerFixed.js +0 -74
  38. data/vendor/assets/javascripts/oulu/plugins/jquery.autosize.min.js +0 -7
  39. data/vendor/assets/javascripts/oulu/plugins/jquery.cheat-code.js +0 -63
  40. data/vendor/assets/javascripts/oulu/plugins/jquery.css3form.js +0 -195
  41. data/vendor/assets/javascripts/oulu/plugins/jquery.depend.min.js +0 -13
  42. data/vendor/assets/javascripts/oulu/plugins/sns-buttons.js +0 -339
  43. data/vendor/assets/javascripts/oulu/plugins/waves.js +0 -338
  44. data/vendor/assets/stylesheets/settings/functions/_grid.sass +0 -34
@@ -1,74 +0,0 @@
1
- /*--------------------------------------------------------------------------*
2
- *
3
- * footerFixed.js
4
- *
5
- * MIT-style license.
6
- *
7
- * 2007 Kazuma Nishihata [to-R]
8
- * http://blog.webcreativepark.net
9
- *
10
- *--------------------------------------------------------------------------*/
11
-
12
- new function(){
13
-
14
- var footerId = "footer";
15
- //メイン
16
- function footerFixed(){
17
- //ドキュメントの高さ
18
- var dh = document.getElementsByTagName("body")[0].clientHeight;
19
- //フッターのtopからの位置
20
- document.getElementById(footerId).style.top = "0px";
21
- var ft = document.getElementById(footerId).offsetTop;
22
- //フッターの高さ
23
- var fh = document.getElementById(footerId).offsetHeight;
24
- //ウィンドウの高さ
25
- if (window.innerHeight){
26
- var wh = window.innerHeight;
27
- }else if(document.documentElement && document.documentElement.clientHeight != 0){
28
- var wh = document.documentElement.clientHeight;
29
- }
30
- if(ft+fh<wh){
31
- document.getElementById(footerId).style.position = "relative";
32
- document.getElementById(footerId).style.top = (wh-fh-ft-1)+"px";
33
- }
34
- }
35
-
36
- //文字サイズ
37
- function checkFontSize(func){
38
-
39
- //判定要素の追加
40
- var e = document.createElement("div");
41
- var s = document.createTextNode("S");
42
- e.appendChild(s);
43
- e.style.visibility="hidden"
44
- e.style.position="absolute"
45
- e.style.top="0"
46
- document.body.appendChild(e);
47
- var defHeight = e.offsetHeight;
48
-
49
- //判定関数
50
- function checkBoxSize(){
51
- if(defHeight != e.offsetHeight){
52
- func();
53
- defHeight= e.offsetHeight;
54
- }
55
- }
56
- setInterval(checkBoxSize,1000)
57
- }
58
-
59
- //イベントリスナー
60
- function addEvent(elm,listener,fn){
61
- try{
62
- elm.addEventListener(listener,fn,false);
63
- }catch(e){
64
- elm.attachEvent("on"+listener,fn);
65
- }
66
- }
67
-
68
- addEvent(window,"load",footerFixed);
69
- addEvent(window,"load",function(){
70
- checkFontSize(footerFixed);
71
- });
72
- addEvent(window,"resize",footerFixed);
73
-
74
- }
@@ -1,7 +0,0 @@
1
- /*!
2
- Autosize v1.18.4 - 2014-01-11
3
- Automatically adjust textarea height based on user input.
4
- (c) 2014 Jack Moore - http://www.jacklmoore.com/autosize
5
- license: http://www.opensource.org/licenses/mit-license.php
6
- */
7
- !function(a){var b,c={className:"autosizejs",append:"",callback:!1,resizeDelay:10,placeholder:!0},d='<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',e=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],f=a(d).data("autosize",!0)[0];f.style.lineHeight="99px","99px"===a(f).css("lineHeight")&&e.push("lineHeight"),f.style.lineHeight="",a.fn.autosize=function(d){return this.length?(d=a.extend({},c,d||{}),f.parentNode!==document.body&&a(document.body).append(f),this.each(function(){function c(){var b,c=window.getComputedStyle?window.getComputedStyle(m,null):!1;c?(b=m.getBoundingClientRect().width,0===b&&(b=parseInt(c.width,10)),a.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(a,d){b-=parseInt(c[d],10)})):b=Math.max(n.width(),0),f.style.width=b+"px"}function g(){var g={};if(b=m,f.className=d.className,j=parseInt(n.css("maxHeight"),10),a.each(e,function(a,b){g[b]=n.css(b)}),a(f).css(g),c(),window.chrome){var h=m.style.width;m.style.width="0px";{m.offsetWidth}m.style.width=h}}function h(){var e,h;b!==m?g():c(),f.value=!m.value&&d.placeholder?(a(m).attr("placeholder")||"")+d.append:m.value+d.append,f.style.overflowY=m.style.overflowY,h=parseInt(m.style.height,10),f.scrollTop=0,f.scrollTop=9e4,e=f.scrollTop,j&&e>j?(m.style.overflowY="scroll",e=j):(m.style.overflowY="hidden",k>e&&(e=k)),e+=o,h!==e&&(m.style.height=e+"px",p&&d.callback.call(m,m))}function i(){clearTimeout(l),l=setTimeout(function(){var a=n.width();a!==r&&(r=a,h())},parseInt(d.resizeDelay,10))}var j,k,l,m=this,n=a(m),o=0,p=a.isFunction(d.callback),q={height:m.style.height,overflow:m.style.overflow,overflowY:m.style.overflowY,wordWrap:m.style.wordWrap,resize:m.style.resize},r=n.width();n.data("autosize")||(n.data("autosize",!0),("border-box"===n.css("box-sizing")||"border-box"===n.css("-moz-box-sizing")||"border-box"===n.css("-webkit-box-sizing"))&&(o=n.outerHeight()-n.height()),k=Math.max(parseInt(n.css("minHeight"),10)-o||0,n.height()),n.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word",resize:"none"===n.css("resize")||"vertical"===n.css("resize")?"none":"horizontal"}),"onpropertychange"in m?"oninput"in m?n.on("input.autosize keyup.autosize",h):n.on("propertychange.autosize",function(){"value"===event.propertyName&&h()}):n.on("input.autosize",h),d.resizeDelay!==!1&&a(window).on("resize.autosize",i),n.on("autosize.resize",h),n.on("autosize.resizeIncludeStyle",function(){b=null,h()}),n.on("autosize.destroy",function(){b=null,clearTimeout(l),a(window).off("resize",i),n.off("autosize").off(".autosize").css(q).removeData("autosize")}),h())})):this}}(window.jQuery||window.$);
@@ -1,63 +0,0 @@
1
- /*global window,document,jQuery */
2
-
3
- /*!
4
- * Cheat Code: a jQuery Plugin
5
- * @author: Trevor Morris (trovster)
6
- * @url: http://www.trovster.com/lab/code/plugins/jquery.cheat-code.js
7
- * @documentation: http://www.trovster.com/lab/plugins/cheat-code/
8
- * @published: 10/05/2009
9
- * @updated: 10/05/2009
10
- * @license Creative Commons Attribution Non-Commercial Share Alike 3.0 Licence
11
- * http://creativecommons.org/licenses/by-nc-sa/3.0/
12
- */
13
- if (typeof jQuery !== 'undefined') {
14
- jQuery(function ($) {
15
-
16
- var complete = function (o) {
17
- var $overlay = $('<div class="overlay" />'),
18
- $message = $('<div class="modal" />');
19
-
20
- $overlay.add($message.text(o.message)).appendTo('body');
21
- window.setTimeout(function () {
22
- $message.fadeOut(500, function () {
23
- $(this).remove();
24
- $overlay.fadeOut(500, function () {
25
- $(this).remove();
26
- });
27
- });
28
- }, 1000);
29
- },
30
- unbind = function (o) {
31
- if (o.unbind === true) {
32
- $(this).unbind('keydown.cheatCode' + o.code.toString());
33
- }
34
- };
35
-
36
- $.fn.extend({
37
- cheatCode: function (options) {
38
- var $$ = $(this),
39
- s = $.extend({}, $.fn.cheatCode.defaults, options),
40
- o = $.metadata ? $.extend({}, s, $$.metadata()) : s,
41
- k = [];
42
-
43
- return this.each(function () {
44
- $$.bind('keydown.cheatCode' + o.code.toString(), function (event) {
45
- k.push(event.keyCode);
46
- if (k.toString().indexOf(o.code) >= 0) {
47
- k = [];
48
- o.activated.call(this, o);
49
- unbind.call(this, o);
50
- }
51
- });
52
- });
53
- }
54
- });
55
-
56
- $.fn.cheatCode.defaults = {
57
- code: '38,38,40,40,37,39,37,39,66,65',
58
- unbind: true,
59
- activated: function (o) {complete(o)},
60
- message: 'Cheat Code Activated'
61
- };
62
- }(jQuery));
63
- }
@@ -1,195 +0,0 @@
1
- /* ======================================================
2
- Script information
3
-
4
- file name :jquery.css3form.js
5
- book info :CSS3デザインプロフェッショナルガイド
6
- author :秋葉秀樹、秋葉ちひろ、宮澤了祐
7
- created :2011.05.28
8
- update :-
9
- script info :
10
- ・チェックボックスの場合div.customCheckBoxが生成されます。
11
- ・ラジオボタンの場合div.customRadioBoxが生成されます。
12
- ・セレクトの場合div.customSelectorが生成されます。
13
- ====================================================== */
14
- $(function(){
15
-
16
- $.fn.css3form = function(){
17
- var form = $(this).addClass("css3form");
18
-
19
- var checkRadioButton = function() {
20
- var more = $(this).parents(".customRadioButton").parent();
21
- if($(this).hasClass("more") && $(this).hasClass("checked")){
22
- more.find(".moreQuestion").show(300);
23
- }else{
24
- more.find(".moreQuestion").hide(300);
25
- }
26
- }
27
-
28
- var update_radio = function(radio){
29
- if(radio.hasClass("css3form-radio"))return;
30
- wrap = $("<ul></ul>").appendTo($("<div></div>").addClass("customRadioButton").insertBefore(radio));
31
-
32
- $("input[name="+ radio.attr("name") + "]").each(function(){
33
- ele = $(this).addClass("css3form-radio");
34
- label = $("label[for="+ele.attr("id")+"]");
35
- toggle_btn = $("<a></a>").attr("href","#").html(label.html());
36
- wrap.append(toggle_btn);
37
- toggle_btn.wrap("<li></li>");
38
-
39
- func = function(_ele,_btn,_wrap){
40
- return function(){
41
- _ele.trigger("click");
42
- _wrap.find(".checked").removeClass("checked");
43
- _btn.addClass("checked");
44
- checkRadioButton.apply(_btn);
45
- return false;
46
- }
47
- }(ele,toggle_btn,wrap);
48
-
49
- toggle_btn.click(func);
50
- ele.hide();
51
- label.hide();
52
-
53
- if(ele.attr("checked")){
54
- toggle_btn.addClass("checked");
55
- }
56
- if(ele.hasClass("more")){
57
- toggle_btn.addClass("more");
58
- }
59
- });
60
-
61
- };
62
-
63
- var update_checkbox = function(check){
64
- if(check.hasClass("css3form-checkbox"))return;
65
- wrap = check.parent().find(".customCheckBox ul");
66
- if(wrap.size() < 1)wrap = $("<ul></ul>").appendTo($("<div></div>").addClass("customCheckBox").insertBefore(check));
67
-
68
-
69
- (function(){
70
- ele = $(this).addClass("css3form-checkbox");
71
- label = $("label[for="+ele.attr("id")+"]");
72
- toggle_btn = $("<a></a>").attr("href","#").html(label.html());
73
- wrap.append(toggle_btn);
74
- toggle_btn.wrap("<li></li>");
75
- func = function(_ele,_btn,_wrap){
76
- return function(){
77
- _ele.trigger("click");
78
- _btn.toggleClass("checked");
79
- return false;
80
- }
81
- }(ele,toggle_btn,wrap);
82
-
83
- toggle_btn.click(func);
84
- ele.hide();
85
- label.hide();
86
-
87
- if(ele.attr("checked")){
88
- toggle_btn.addClass("checked");
89
- }
90
- }).apply(check);
91
-
92
-
93
- };
94
-
95
- var update_select = function(select){
96
- wrap = $("<div><dl><dd><ul></ul></dd></dl></div>").addClass("customSelector").insertBefore(select);
97
- dd = wrap.find("dd");
98
- dd.css({"height": 0,"overflow":"hidden"}); // added
99
- select.find("option").each(function(){
100
- //blank
101
- if($(this).val().length < 1){
102
- var btn = $("<a></a>").addClass("customSelector-label")
103
- .attr("href","javascript:void(0);")
104
- .html($(this).html())
105
- .click((function(_wrap){
106
- return function(e){
107
- _dd = _wrap.find("dd").toggleClass("open");
108
- _dd.height(_dd.find("ul").height() * _dd.hasClass("open") );
109
- return false;
110
- }
111
- }(wrap)
112
- ));
113
- wrap.find("dl").append($("<dt></dt>").append(btn));
114
- $(window).bind("click",function(){
115
- if(wrap.find("dd").hasClass("open")){
116
- btn.trigger("click");
117
- }
118
- });
119
- return;
120
- }
121
-
122
- toggle_btn = $("<a></a>").attr("href","javascript:void(0);").html($(this).html());
123
- wrap.find("ul").append(toggle_btn);
124
- toggle_btn.wrap("<li></li>");
125
-
126
- func = function(_opt,_select,_wrap,_dd){
127
- return function(){
128
- _select.val(_opt.val());
129
- _wrap.find(".customSelector-label").html(_opt.html());
130
- _dd = _wrap.find("dd.open").removeClass("open").height(0);
131
- return false;
132
- }
133
- }($(this),select,wrap,dd);
134
-
135
- toggle_btn.click(func);
136
-
137
- });
138
-
139
- select.hide();
140
- };
141
-
142
-
143
-
144
- $(this).find("input[type=radio]").each(function(){
145
- update_radio($(this));
146
- });
147
- $(this).find("input[type=checkbox]").each(function(){
148
- update_checkbox($(this));
149
- });
150
- $(this).find("select").each(function(){
151
- update_select($(this));
152
- });
153
- $(this).find("input[type=email]").each(function(){
154
- $(this).bind("blur",function(){
155
- var check_valid_email = function(value){
156
- if(value.match(/^[A-Za-z0-9]+[\w-]+@[\w\.-]+\.\w{2,}$/)){
157
- $(this).removeClass("mail_error");
158
- form.unbind("submit",function(){ return false; });
159
- return true;
160
- }
161
- $(this).addClass("mail_error");
162
- form.bind("submit",function(){ return false; });
163
- return false;
164
- };
165
-
166
- if(check_valid_email($(this).val())){
167
- return true;
168
- }
169
-
170
- $(this).addClass("mail_error");
171
- $(this).focus();
172
-
173
- return false;
174
- }).bind("keydown",function(){
175
- $(this).removeClass("mail_error");
176
- form.unbind("submit",function(){ return false; });
177
- });
178
- $(this).get(0).setAttribute("type","text");
179
- });
180
-
181
- //zipcode
182
- $(".css3form_zipcode").bind("blur",function(){
183
- val = $(this).val().replace(/(\d{3})-(\d{4})/,"$1$2");
184
- if(val.length < 3)return;
185
- target = $(".css3form_address");
186
- //@see http://groovetechnology.co.jp/webservice/zipsearch/index.html
187
- $.getJSON("http://groovetechnology.co.jp/ZipSearchService/v1/zipsearch?zipcode="+val+"&callback=?",function(data){
188
- target.val(data.zipcode.a1.prefecture + data.zipcode.a1.city + data.zipcode.a1.town);
189
- });
190
- });
191
-
192
-
193
- return $(this);
194
- };
195
- });
@@ -1,13 +0,0 @@
1
- /*
2
- Copyright (c) 2013 akinari tsugo
3
- This script released under the MIT license (MIT-LICENSE.txt).
4
- */
5
- (function(g,h,l,m){var f,k;f=function(a){this.revision=this.build=this.minor=this.major=this.original=null;this.initialize(a)};f.prototype.initialize=function(a){var b=a.split(".");this.original=a;this.major=b&&b[0]?parseInt(b[0],10):null;this.minor=b&&b[1]?parseInt(b[1],10):null;this.build=b&&b[2]?parseInt(b[2],10):null;this.revision=b&&b[3]?parseInt(b[3],10):null};f.prototype.isEqual=function(a,b,c,d){return"number"!==typeof a?!1:"number"!==typeof b?this.major===a:"number"!==typeof c?this.major===
6
- a&&this.minor===b:"number"!==typeof d?this.major===a&&this.minor===b&&this.build===c:this.major===a&&this.minor===b&&this.build===c&&this.revision===d};f.prototype.isOrLess=function(a,b,c,d){return"number"!==typeof a?!1:this.major!==a?this.major<a:"number"!==typeof b?!0:this.minor!==b?this.minor<b:"number"!==typeof c?!0:this.build!==c?this.build<c:"number"!==typeof d?!0:this.revision!==d?this.revision<d:!0};f.prototype.isLessThan=function(a,b,c,d){return"number"!==typeof a?!1:this.major!==a?this.major<
7
- a:"number"!==typeof b?!1:this.minor!==b?this.minor<b:"number"!==typeof c?!1:this.build!==c?this.build<c:"number"!==typeof d?!1:this.revision!==d?this.revision<d:!1};f.prototype.isOrMore=function(a,b,c,d){return"number"!==typeof a?!1:this.major!==a?this.major>a:"number"!==typeof b?!0:this.minor!==b?this.minor>b:"number"!==typeof c?!0:this.build!==c?this.build>c:"number"!==typeof d?!0:this.revision!==d?this.revision>d:!0};f.prototype.isMoreThan=function(a,b,c,d){return"number"!==typeof a?!1:this.major!==
8
- a?this.major>a:"number"!==typeof b?!1:this.minor!==b?this.minor>b:"number"!==typeof c?!1:this.build!==c?this.build>c:"number"!==typeof d?!1:this.revision!==d?this.revision>d:!1};f.prototype.toString=function(){return this.original};h=function(){this.original="";this.version=null;this.initialize(g.navigator.userAgent)};h.prototype.initialize=function(a){var b,c="",d=b="",e=null;a=a.toLowerCase();0<=a.indexOf("opera")?(0<=a.indexOf("opera mini")?(c="operamini",b=/opera mini\/([\d\.]+)/.exec(a)):0<=
9
- a.indexOf("opera mobi")?(c="operamobile",b=/version\/([\d\.]+)/.exec(a)):(c="opera",b=/opera[\s\/]+([\d\.]+)/.exec(a)),e=b?b[1]:""):0<=a.indexOf("msie")||0<=a.indexOf("trident")?(c="msie",e=(b=/(msie|rv:?)\s?([\d\.]+)/.exec(a))?b[2]:""):0<=a.indexOf("firefox")?(c="firefox",e=(b=/firefox\/([\d\.]+)/.exec(a))?b[1]:""):0<=a.indexOf("chrome")||0<=a.indexOf("crios")?(c="chrome",e=(b=/[chrome|crios]\/([\d\.]+)/.exec(a))?b[1]:""):0<=a.indexOf("android")?(c="browser",e=(b=/version\/([\d\.]+)/.exec(a))?b[1]:
10
- ""):0<=a.indexOf("silk")?(c="silk",e=(b=/silk\/([\d\.]*)/.exec(a))?b[1]:""):0<=a.indexOf("mercury")?(c="mercury",e=(b=/mercury\/([\d\.]+)/.exec(a))?b[1]:""):0<=a.indexOf("safari")?(c="safari",e=(b=/version\/([\d\.]+)/.exec(a))?b[1]:""):(c="unknown",e="");b=0<=a.indexOf("webkit")?"webkit":0<=a.indexOf("trident")?"trident":0<=a.indexOf("presto")?"presto":0<=a.indexOf("khtml")?"khtml":0<=a.indexOf("gecko")?"gecko":"unknown";d=0<=a.indexOf("arm")?"arm":0<=a.indexOf("win64")?0<=a.indexOf("ia64")?"ia64":
11
- "x64":"x86";this.original=c;this[c]=!0;this[b]=!0;this[d]=!0;this.version=!g.__BACKWARD_COMPATIBILITY_ENABLED?new f(e):e};h.prototype.is=function(a){return"string"===typeof a&&a.toLowerCase()===this.original};k=function(){this.original="";this.initialize(g.navigator.userAgent)};k.prototype.initialize=function(a){var b="",c="",d="",e="",c=null;a=a.toLowerCase();(c=/iphone|ipod|ipad|android|windows phone|silk|blackberry|symbian|mobile/.exec(a))?0<=a.indexOf("silk")?(b="tablet",c="android"):(b=0<=a.indexOf("android")&&
12
- 0>a.indexOf("mobile")||0<=a.indexOf("ipad")?"tablet":"mobile",c=c[0].replace(" ","")):0<=a.indexOf("windows")?(b="pc",c="windows",e=(d=/windows nt ([\d\.]+)/.exec(a))?d[1]:"",d=0<=a.indexOf("arm")?"arm":0<=a.indexOf("win64")?0<=a.indexOf("ia64")?"ia64":"x64":0<=a.indexOf("wow64")?"x64":"x86"):(0<=a.indexOf("mac")?(b="pc",c="mac"):0<=a.indexOf("linux")?(b="pc",c="linux"):c=b="unknown",d="unknown");this.type=b;this.original=c;this[b]=!0;this[c]=!0;this[d]=!0;this.version=new f(e)};k.prototype.is=function(a){return"string"===
13
- typeof a?(a=a.toLowerCase(),a===this.original||a===this.type):!1};l.browser=new h;l.platform=new k;l.depend=function(){var a,b,c,d;c=arguments;a=0;for(b=c.length;a<b;a++)if(d=c[a],(!0===d.on||d.on===m)&&"function"===typeof d.exe)return d.exe();g.console&&g.console.log&&g.console.log('Not implemented default process in "$.depend" function.');return m}})(window,document,jQuery);
@@ -1,339 +0,0 @@
1
- /*
2
- * Social Info 0.2 - jQuery plugin
3
- * written by cyokodog
4
- *
5
- * Copyright (c) 2014 cyokodog
6
- * http://www.cyokodog.net/
7
- * http://d.hatena.ne.jp/cyokodog/)
8
- * http://cyokodog.tumblr.com/
9
- * MIT LICENCE
10
- *
11
- * Built for jQuery library
12
- * http://jquery.com
13
- *
14
- */
15
-
16
- ;(function($){
17
-
18
- $.social = $.social || {};
19
- $.si = $.social.info = {
20
- jsonp : function( p ){
21
- return $.ajax({
22
- url:p.url,
23
- dataType:'jsonp',
24
- data:p.data,
25
- success:function( r ){
26
- p.callback(r);
27
- }
28
- });
29
- },
30
- reArg : function(url , callback){
31
- if(typeof url == 'object') return url;
32
- if(typeof url == 'function'){
33
- callback = url;
34
- url = '';
35
- }
36
- url = url || location.href;
37
- return {
38
- url : url,
39
- callback : callback
40
- };
41
- },
42
- cache : {
43
- twitter : {
44
- entryCount : {}
45
- }
46
- },
47
- version : '0.2',
48
- id : 'social-info',
49
- name : 'Social Info'
50
- }
51
-
52
-
53
- $.si.twitter = {
54
- getEntryCount : function(url, callback){
55
- var arg = $.extend({
56
- url : location.href,
57
- useCache : true,
58
- callback : function( count ){}
59
- }, $.si.reArg(url, callback))
60
- var cache = $.si.cache.twitter.entryCount;
61
- var eurl = encodeURIComponent(url);
62
- if(arg.useCache && cache[eurl] != undefined){
63
- arg.callback(cache[eurl]);
64
- return;
65
- }
66
- $.si.jsonp({
67
- url : 'http://urls.api.twitter.com/1/urls/count.json',
68
- data : {
69
- url : arg.url
70
- },
71
- callback : function(r){
72
- var count = r = !r ? 0 : r.count;
73
- cache[eurl] = count;
74
- arg.callback(count);
75
- }
76
- });
77
- },
78
- getEntryUrl : function(url, title ){
79
- url = url || location.href;
80
- if(title) title = '&text=' + encodeURIComponent(title);
81
- else{
82
- if(url == location.href) title = '&text=' + encodeURIComponent(document.title);
83
- }
84
- return 'https://twitter.com/intent/tweet?url=' + encodeURIComponent(url) + (title || '');
85
- },
86
- getSearchUrl : function( url ){
87
- url = url || location.href;
88
- return 'https://twitter.com/search?q=' + encodeURIComponent( url );
89
- }
90
- }
91
-
92
- $.si.facebook = {
93
- getEntryCount : function( url , callback){
94
- var arg = $.si.reArg(url, callback)
95
- $.si.jsonp({
96
- url : 'https://graph.facebook.com/',
97
- data : {
98
- id : arg.url
99
- },
100
- callback : function(r){
101
- arg.callback(r.shares || 0);
102
- }
103
- });
104
- },
105
- getEntryUrl : function( url ){
106
- url = url || location.href;
107
- return 'http://www.facebook.com/sharer.php?u=' + encodeURIComponent(url);
108
- },
109
- getSearchUrl : function( url ){
110
- url = url || location.href;
111
- return 'https://www.facebook.com/#!/search/results.php?q=' + encodeURIComponent( url );
112
- }
113
- }
114
-
115
- $.si.googleplus = {
116
- getEntryCount : function( url , callback){
117
- var arg = $.si.reArg(url, callback)
118
- $.ajax({
119
- type: "get",
120
- dataType: "xml",
121
- url: "http://query.yahooapis.com/v1/public/yql",
122
- data: {
123
- q: "SELECT content FROM data.headers WHERE url='https://plusone.google.com/_/+1/fastbutton?hl=ja&url=" + arg.url + "' and ua='#Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36'",
124
- format: "xml",
125
- env: "http://datatables.org/alltables.env"
126
- },
127
- success: function (data) {
128
- var content = $(data).find("content").text();
129
- var match = content.match(/window\.__SSR[\s*]=[\s*]{c:[\s*](\d+)/i);
130
- var count = (match != null) ? match[1] : 0;
131
- arg.callback(count);
132
- }
133
- });
134
- },
135
- getEntryUrl : function( url ){
136
- url = url || location.href;
137
- return 'https://plus.google.com/share?url=' + encodeURIComponent(url);
138
- },
139
- getSearchUrl : function( url ){
140
- url = url || location.href;
141
- return 'https://plus.google.com/u/0/?tab=mX#s/' + encodeURIComponent( url );
142
- }
143
- }
144
-
145
-
146
- $.si.hatebu = {
147
- getEntryCount : function( url , callback){
148
- var arg = $.si.reArg(url, callback)
149
- $.si.jsonp({
150
- url : 'http://api.b.st-hatena.com/entry.count',
151
- data : {
152
- url : arg.url
153
- },
154
- callback : arg.callback
155
- });
156
- },
157
- getEntryUrl : function(url){
158
- url = url || location.href;
159
- return 'http://b.hatena.ne.jp/entry/' + url.replace(/^http:\/\//,'').replace(/^https:\/\//,'s/');
160
- },
161
- getSearchUrl : function( url ){
162
- url = url || location.href;
163
- return 'http://b.hatena.ne.jp/entrylist?url=' + encodeURIComponent( url );
164
- },
165
- getEntryList : function( url, sort, callback){
166
- if(typeof sort == 'function'){
167
- callback = sort;
168
- sort = 'count';
169
- }
170
- if(typeof url == 'function'){
171
- callback = url;
172
- sort = 'count';
173
- url = '';
174
- }
175
- url = url || location.href;
176
- $.si.jsonp({
177
- url : 'http://b.hatena.ne.jp/entrylist/json',
178
- data : {
179
- sort : sort,
180
- url : url
181
- },
182
- callback : callback
183
- });
184
- },
185
- getEntry : function( url , callback){
186
- var arg = $.si.reArg(url, callback)
187
- $.si.jsonp({
188
- url : 'http://b.hatena.ne.jp/entry/jsonlite/',
189
- data : {
190
- url : arg.url
191
- },
192
- callback : arg.callback
193
- });
194
- },
195
- getProfileImgUrl : function(id, size){
196
- size = size ? '_'+size : '';
197
- return 'http://cdn.www.st-hatena.com/users/mo/'+id+'/profile'+size+'.gif';
198
- },
199
- getEntryImgUrl : function(url){
200
- return 'http://b.hatena.ne.jp/entry/image/' + url;
201
- }
202
- };
203
-
204
-
205
- })(jQuery);
206
-
207
- /*
208
- * Easy Social Buttons 0.2 - jQuery plugin
209
- * written by cyokodog
210
- *
211
- * Copyright (c) 2014 cyokodog
212
- * http://www.cyokodog.net/
213
- * http://d.hatena.ne.jp/cyokodog/)
214
- * http://cyokodog.tumblr.com/
215
- * MIT LICENCE
216
- *
217
- * Built for jQuery library
218
- * http://jquery.com
219
- *
220
- */
221
-
222
-
223
- ;(function($){
224
-
225
- var plugin = $.esb = $.easySocialButtons = function(option ){
226
- var callee = arguments.callee;
227
- if(!(this instanceof callee)) return new callee(option );
228
- var o = this, c = o.config = $.extend(true, {}, callee.defaults, option);
229
- c.orders = option.orders || c.orders;
230
- c.buttons = $('<ul class="easy-social-buttons-container sns-buttons__items"/>');
231
- if(c.inverseColor) c.buttons.addClass('esb-inverse');
232
- $.each(c.orders, function(){
233
- var sname = this.toString();
234
- var api = c[sname] = $.esb[sname](option );
235
- api.getButton().appendTo(c.buttons);
236
- });
237
- }
238
- $.extend(plugin.prototype, {
239
- getButtons : function(){ // ボタンの取得
240
- var o = this, c = o.config;
241
- return c.buttons;
242
- },
243
- getButtonAPI : function(name ){ // API の取得
244
- var o = this, c = o.config;
245
- return c[name];
246
- }
247
- });
248
- $.extend(plugin, {
249
- defaults : {
250
- autoAdd : true, // true でボタンの自動挿入を行う
251
- addMethod : 'insertAfter', // ボタンの挿入メソッドを指定
252
- callback : function(api ){}, // プラグイン実行後のコールバック処理
253
- orders : ['hatebu','twitter', 'facebook', 'googleplus'], // ボタンの表示順
254
- labels : { // サービスの表示名
255
- 'hatebu' : '<i class="fa fa-hatena sns-buttons__icon is-hatena"></i>',
256
- 'twitter' : '<i class="fa fa-twitter sns-buttons__icon is-twitter"></i>',
257
- 'facebook' : '<i class="fa fa-facebook sns-buttons__icon is-facebook"></i>',
258
- 'googleplus' : '<i class="fa fa-google-plus sns-buttons__icon is-google-plus"></i>'
259
- }
260
- },
261
- version : '0.2',
262
- id : 'easy-social-buttons',
263
- name : 'Easy Social Buttons'
264
- });
265
-
266
- $.fn.easySocialButtons = function(option ){
267
- var c = $.extend(true, {}, plugin.defaults, option);
268
- if(option) c.orders = option.orders || c.orders;
269
- return this.each(function(){
270
- var t = $(this);
271
- c.url = t.prop('href') || t.data('href') || t.data('url') || c.url;
272
- if(!c.url){
273
- c.url = location.href;
274
- c.addMethod = 'appendTo';
275
- }
276
- var api = $.easySocialButtons(c);
277
- if(c.autoAdd){
278
- api.getButtons(c)[c.addMethod](t);
279
- }
280
- c.callback.apply(t[0], [api]);
281
- });
282
- }
283
-
284
- var DF = plugin.defaults;
285
- $.each(DF.orders, function(idx){
286
- var sname = this.toString();
287
- var f = $.esb[sname] = function(option ){
288
- var callee = arguments.callee;
289
- if(!(this instanceof callee)) return new callee(option );
290
- var o = this, c = o.config = $.extend(true, {}, callee.defaults, callee.overwrite[sname] || {}, option, option[sname]);
291
- c.url = c.url || location.href;
292
- c.button = $(c.tempalte);
293
- c.wrapper = c.button.hasClass('esb') ? c.button : c.button.find('.esb');
294
- c.label = c.wrapper.find('.esb-label').html(c.label);
295
- c.counter = c.wrapper.find('.esb-counter').html(c.waitCounter);
296
- c.entryLink = c.wrapper.find('a.esb-entry');
297
- c.searchLink = c.wrapper.find('a.esb-search');
298
- if(c.useBrandColor) c.wrapper.addClass('esb-' + sname);
299
- if($.si){
300
- var SI = $.si[sname];
301
- if(c.counter.size() && SI.getEntryCount){
302
- SI.getEntryCount(c.url, function(count ){
303
- c.counter.text(count);
304
- });
305
- }
306
- !SI.getEntryUrl || c.entryLink.prop('href', SI.getEntryUrl(c.url )).prop('title', c.entryTitle);
307
- !SI.getSearchUrl || c.searchLink.prop('href', SI.getSearchUrl(c.url )).prop('title', c.searchTitle);
308
- }
309
- }
310
- $.extend(f.prototype, {
311
- getButton : function(){
312
- var o = this, c = o.config;
313
- return c.button;
314
- }
315
- });
316
- $.extend(f, {
317
- id : sname,
318
- defaults : {
319
- url : '',
320
- label : DF.labels[sname],
321
- entryTitle : '投稿する', // esb-entry クラスを持つ要素に割り当てる title 属性値
322
- searchTitle : '検索する', // esb-search クラスを持つ要素に割り当てる title 属性値
323
- waitCounter : '<span>&nbsp;</span>', // Web API の取得結果待ち時に表示するマークアップ
324
- tempalte : '<li class="esb sns-buttons__item"><a class="esb-label esb-entry sns-buttons__entry-link" target="_blank"></a><a class="esb-counter esb-search sns-buttons__search-link" target="_blank"></a></li>', // ボタンのテンプレート
325
- useBrandColor : false, // ブランドカラーの使用
326
- inverseColor : false // ブランドカラー未使用時の配色の反転
327
- },
328
- overwrite : {
329
- hatebu : {
330
- entryTitle : 'ブックマークする'
331
- }
332
- }
333
- });
334
- });
335
- })(jQuery);
336
-
337
- $(function(){
338
- $('.sns-buttons').easySocialButtons();
339
- });