diff --git a/js/jquery.socialbutton-1.9.1.js b/js/jquery.socialbutton-1.9.1.js index 8a06cf5..c2f9bbf 100644 --- a/js/jquery.socialbutton-1.9.1.js +++ b/js/jquery.socialbutton-1.9.1.js @@ -691,8 +691,8 @@ function socialbutton_hatena_oldstyle(target, options, defaults, index, max_inde url = htmlspecialchars(url); var tag = '' - + '' - + '' + + '' + + '' + ''; $(target).html(tag); diff --git a/js/mediaelementplayer/mediaelement-and-player.js b/js/mediaelementplayer/mediaelement-and-player.js index 43c99a1..e833804 100755 --- a/js/mediaelementplayer/mediaelement-and-player.js +++ b/js/mediaelementplayer/mediaelement-and-player.js @@ -4959,7 +4959,7 @@ if (typeof jQuery != 'undefined') { text = text + '\n' + lines[i]; i++; } - text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); + text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); // Text is in a different array so I can use .join entries.text.push(text); entries.times.push( @@ -5021,7 +5021,7 @@ if (typeof jQuery != 'undefined') { if (style) _temp_times.style = style; if (_temp_times.start === 0) _temp_times.start = 0.200; entries.times.push(_temp_times); - text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); + text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); entries.text.push(text); if (entries.times.start === 0) entries.times.start = 2; } diff --git a/js/mediaelementplayer/mediaelement-and-player.min.js b/js/mediaelementplayer/mediaelement-and-player.min.js index 01c42c9..cc03872 100755 --- a/js/mediaelementplayer/mediaelement-and-player.min.js +++ b/js/mediaelementplayer/mediaelement-and-player.min.js @@ -170,10 +170,10 @@ a.entries.times.length;b++)if(this.media.currentTime>=a.entries.times[b].start&& e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-1&&e+d<100)e=100-d;b.chapters.append(f('
'+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+ "
"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German", el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, -parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d,g;b=0&&a[b-1]!=="")g=a[b-1];b++;d=a[b];for(b++;a[b]!==""&&b$1");c.text.push(d);c.times.push({identifier:g,start:mejs.Utility.convertSMPTEtoSeconds(e[1])===0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), +parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d,g;b=0&&a[b-1]!=="")g=a[b-1];b++;d=a[b];for(b++;a[b]!==""&&b$1");c.text.push(d);c.times.push({identifier:g,start:mejs.Utility.convertSMPTEtoSeconds(e[1])===0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}g=""}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b$1");a.text.push(d);if(a.times.start===0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d$1");a.text.push(d);if(a.times.start===0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()}, isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a, diff --git a/js/mediaelementplayer/mediaelementplayer.js b/js/mediaelementplayer/mediaelementplayer.js index 382aa9d..7d94616 100755 --- a/js/mediaelementplayer/mediaelementplayer.js +++ b/js/mediaelementplayer/mediaelementplayer.js @@ -2997,7 +2997,7 @@ if (typeof jQuery != 'undefined') { text = text + '\n' + lines[i]; i++; } - text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); + text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); // Text is in a different array so I can use .join entries.text.push(text); entries.times.push( @@ -3059,7 +3059,7 @@ if (typeof jQuery != 'undefined') { if (style) _temp_times.style = style; if (_temp_times.start === 0) _temp_times.start = 0.200; entries.times.push(_temp_times); - text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); + text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "$1"); entries.text.push(text); if (entries.times.start === 0) entries.times.start = 2; } diff --git a/js/mediaelementplayer/mediaelementplayer.min.js b/js/mediaelementplayer/mediaelementplayer.min.js index f27e748..226d42a 100755 --- a/js/mediaelementplayer/mediaelementplayer.min.js +++ b/js/mediaelementplayer/mediaelementplayer.min.js @@ -97,10 +97,10 @@ a.entries.times.length;b++)if(this.media.currentTime>=a.entries.times[b].start&& e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-1&&e+d<100)e=100-d;b.chapters.append(f('
'+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+ "
"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German", el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, -parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d,g;b=0&&a[b-1]!=="")g=a[b-1];b++;d=a[b];for(b++;a[b]!==""&&b$1");c.text.push(d);c.times.push({identifier:g,start:mejs.Utility.convertSMPTEtoSeconds(e[1])===0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), +parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d,g;b=0&&a[b-1]!=="")g=a[b-1];b++;d=a[b];for(b++;a[b]!==""&&b$1");c.text.push(d);c.times.push({identifier:g,start:mejs.Utility.convertSMPTEtoSeconds(e[1])===0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}g=""}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b$1");a.text.push(d);if(a.times.start===0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d$1");a.text.push(d);if(a.times.start===0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()}, isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a, diff --git a/lib/init.php b/lib/init.php index 19ada87..ab25c9a 100644 --- a/lib/init.php +++ b/lib/init.php @@ -11,7 +11,7 @@ // PukiWiki version / Copyright / Licence define('S_VERSION', '1.4.7'); -define('QHM_VERSION', '7.3.4'); //絶対に編集しないで下さい +define('QHM_VERSION', '7.3.5'); //絶対に編集しないで下さい define('QHM_OPTIONS', 'update=download; support=false; banner=true'); define('S_COPYRIGHT', 'powered by HAIK ' . QHM_VERSION . '
' . diff --git a/lib/qhm_init.php b/lib/qhm_init.php index 1802a20..19c2f9f 100644 --- a/lib/qhm_init.php +++ b/lib/qhm_init.php @@ -656,7 +656,7 @@
  1. 内容を編集して投稿できます。
    %URL% と書くとURLに自動変換されます。
  2. -
  3. クリックしてTwitterへ投稿
  4. +
  5. クリックしてTwitterへ投稿
@@ -667,7 +667,7 @@
  1. 短縮URLをコピーする。
  2. -
  3. ここをクリックして、Facebook を開いて投稿
  4. +
  5. ここをクリックして、Facebook を開いて投稿
diff --git a/plugin/canonical.inc.php b/plugin/canonical.inc.php index c5ee339..d918c7c 100644 --- a/plugin/canonical.inc.php +++ b/plugin/canonical.inc.php @@ -68,7 +68,7 @@ function plugin_canonical_show_info()

このページは canonical URL が指定されています。
- 確認 + 確認

'; } @@ -82,7 +82,7 @@ function plugin_canonical_show_info() このページは canonical URL が指定されています。
- 確認 + 確認 '; } } diff --git a/plugin/convert_haik.inc.php b/plugin/convert_haik.inc.php index 615bbb4..2813797 100644 --- a/plugin/convert_haik.inc.php +++ b/plugin/convert_haik.inc.php @@ -114,7 +114,7 @@ function plugin_convert_haik_action()
- icon プラグインは IcoMoon から glyphicon, font-awesome に変更されました。
+ icon プラグインは IcoMoon から glyphicon, font-awesome に変更されました。
指定したアイコン名によっては表示されなくなる場合があります。
diff --git a/plugin/fb_root.inc.php b/plugin/fb_root.inc.php index ac9d58d..6ba21f6 100644 --- a/plugin/fb_root.inc.php +++ b/plugin/fb_root.inc.php @@ -132,7 +132,7 @@ function plugin_fb_root_set_page_js() function FB_init_callback() { FB.Canvas.setAutoGrow(); //link mod - $("#body a:not([href^=#])").attr("target", "_blank") + $("#body a:not([href^=#])").attr("target", "_blank").attr("rel", "noopener") .filter("[href*=\'facebook.com\']:not([href*=\'developers.facebook.com\'])").attr("target", "_parent"); $("form").append(\' \'); } diff --git a/plugin/otherwin.inc.php b/plugin/otherwin.inc.php index a438175..c458efb 100644 --- a/plugin/otherwin.inc.php +++ b/plugin/otherwin.inc.php @@ -23,10 +23,11 @@ function plugin_otherwin_inline() if (($url == '' && $target == '') || $text == '' || func_num_args() > 3) return PLUGIN_OTHERWIN_USAGE; - $url = is_url($url) ? $url : 'index.php?'.rawurlencode($url); - $target = ($target == '') ? '_blank' : $target; + $url = is_url($url) ? $url : 'index.php?'.rawurlencode($url); + $target = ($target == '') ? '_blank' : $target; + $rel = $target === '_blank' ? 'rel="noopener"' : ''; - $ret = '' . $text . ''; + $ret = '' . $text . ''; return $ret; } diff --git a/plugin/playvideo.inc.php b/plugin/playvideo.inc.php index ef05d1c..6dd8fcc 100644 --- a/plugin/playvideo.inc.php +++ b/plugin/playvideo.inc.php @@ -61,7 +61,7 @@ function startvideo_flvplayerlite(url,e,w,h,cnt) { name: "playerlite" }; - e.innerHTML = 'ビデオの再生には、FlashPlayerが必要です。
こちらより、インストールしてください。

iPad、iPhoneの方は、こちらをクリックするとビデオが再生されます。
ビデオを再生する'; + e.innerHTML = 'ビデオの再生には、FlashPlayerが必要です。
こちらより、インストールしてください。

iPad、iPhoneの方は、こちらをクリックするとビデオが再生されます。
ビデオを再生する'; e.onclick = 'return false'; flashvars.vidPath = url; diff --git a/plugin/qlg.inc.php b/plugin/qlg.inc.php index 4ec9234..692d151 100644 --- a/plugin/qlg.inc.php +++ b/plugin/qlg.inc.php @@ -127,7 +127,7 @@ function plugin_qlg_convert() // ntc end } $add_body = ' -Quick LikeGate はこちら。 +Quick LikeGate はこちら。 '; return convert_html($ntc). $add_body; diff --git a/swfu/ctp/view.html b/swfu/ctp/view.html index b70e2e7..b0069cf 100644 --- a/swfu/ctp/view.html +++ b/swfu/ctp/view.html @@ -150,7 +150,7 @@

の詳細

URL
- 別ウインドウで開く

+ 別ウインドウで開く

Dir

diff --git a/swfu/js/func.js b/swfu/js/func.js index 520c083..bf08aca 100644 --- a/swfu/js/func.js +++ b/swfu/js/func.js @@ -8,236 +8,266 @@ var parentMsgSelectionStart = 0; /** -* template.htmlのの直前で実行される。 -* 見た目の調整などを行っている -*/ -function lastscript(){ - - //Windowのロックについて - var l = $.cookie('locking'); - if(l == 'true'){ - $("a#window_lock img") - .attr({ - src:'images/lock.png', - title:'ロック解除' - }); - } - - if(parent.document.getElementById('msg')){ - } - else{ - $("body").append(''); - } - - if(parent.document.getElementById('wrapper')){ - $("#qhmtop").css('display','none'); - } - else{ - $("#swfutop").css('display','none'); - } - - if (parent.document.getElementById('msg').setSelectionRange) - { - parentMsgSelectionStart = parent.document.getElementById('msg').selectionStart; - } + * template.htmlのの直前で実行される。 + * 見た目の調整などを行っている + */ +function lastscript() { + //Windowのロックについて + var l = $.cookie("locking"); + if (l == "true") { + $("a#window_lock img").attr({ + src: "images/lock.png", + title: "ロック解除" + }); + } + + if (parent.document.getElementById("msg")) { + } else { + $("body").append(""); + } + + if (parent.document.getElementById("wrapper")) { + $("#qhmtop").css("display", "none"); + } else { + $("#swfutop").css("display", "none"); + } + + if (parent.document.getElementById("msg").setSelectionRange) { + parentMsgSelectionStart = parent.document.getElementById("msg") + .selectionStart; + } } function display_buttons() { - if(parent.document.getElementById('msg')){ - } - else{ - $("body").append(''); - } + if (parent.document.getElementById("msg")) { + } else { + $("body").append(""); + } } -function insert_cmd(insert){ - var el = parent.document.getElementById('msg'); - el.focus(); - - var l = $.cookie('locking'); - if(l == 'true'){ - insert = insert+"\n"; - } - - //ブラウザを判定する - var browser = 2; - if (el.length > 0) { - if( el.setSelectionRange ){ - - } else if( parent.document.selection.createRange ){ - browser=1; - } - } - - - if (browser == 1) { // IE - el.focus(); - sel = parent.document.selection.createRange(); - sel.text = insert; - } else { - - var body = el.value; - var at = parentMsgSelectionStart; - var tmp = body.substr(0, at); - - el.value = tmp + insert + body.substr(at, body.length); - var cursor = insert.length + at; - el.setSelectionRange(cursor, cursor); - } - - if(l != 'true'){ - self.parent.tb_remove(); - } - else{ - $('#cmd_msg').show(); - setTimeout(function(){$('#cmd_msg').hide()}, 2000); - - } +function insert_cmd(insert) { + var el = parent.document.getElementById("msg"); + el.focus(); + + var l = $.cookie("locking"); + if (l == "true") { + insert = insert + "\n"; + } + + //ブラウザを判定する + var browser = 2; + if (el.length > 0) { + if (el.setSelectionRange) { + } else if (parent.document.selection.createRange) { + browser = 1; + } + } + + if (browser == 1) { + // IE + el.focus(); + sel = parent.document.selection.createRange(); + sel.text = insert; + } else { + var body = el.value; + var at = parentMsgSelectionStart; + var tmp = body.substr(0, at); + + el.value = tmp + insert + body.substr(at, body.length); + var cursor = insert.length + at; + el.setSelectionRange(cursor, cursor); + } + + if (l != "true") { + self.parent.tb_remove(); + } else { + $("#cmd_msg").show(); + setTimeout(function() { + $("#cmd_msg").hide(); + }, 2000); + } } -function insert_val(id){ +function insert_val(id) { + var val = document.getElementById(id).value; - var val = document.getElementById(id).value; - - insert_cmd(val); + insert_cmd(val); } -function toggle_lock(){ - - var l = $.cookie('locking'); - - if(l == 'true'){ - $("a#window_lock img") - .attr({ - src:'images/unlock.png', - title:'ロック' - }); - $.cookie('locking', 'false'); - } - else{ - $("a#window_lock img") - .attr({ - src:'images/lock.png', - title:'ロック解除' - }); - $.cookie('locking', 'true'); - } +function toggle_lock() { + var l = $.cookie("locking"); + if (l == "true") { + $("a#window_lock img").attr({ + src: "images/unlock.png", + title: "ロック" + }); + $.cookie("locking", "false"); + } else { + $("a#window_lock img").attr({ + src: "images/lock.png", + title: "ロック解除" + }); + $.cookie("locking", "true"); + } } -function disp(){ - if(window.confirm('本当に削除しますか?')){ - return true; - } - else{ - return false; - } +function disp() { + if (window.confirm("本当に削除しますか?")) { + return true; + } else { + return false; + } } -function confirm_page_chg(msg){ - var el = document.getElementById('change_page_name'); - var npage = el.value; - - if(window.confirm('ページ名を「'+msg+'」から、「'+npage+'」に変更しますか?')){ - return true; - } - else{ - return false; - } +function confirm_page_chg(msg) { + var el = document.getElementById("change_page_name"); + var npage = el.value; + + if ( + window.confirm( + "ページ名を「" + msg + "」から、「" + npage + "」に変更しますか?" + ) + ) { + return true; + } else { + return false; + } } -function confirm_page_set(){ - var el = document.getElementById('new_page'); - var msg = el.value; - - if(window.confirm("ページ名に「"+msg+"」をセットします。\n"+msg+"編集中に切り替えます")){ - return true; - } - else{ - return false; - } +function confirm_page_set() { + var el = document.getElementById("new_page"); + var msg = el.value; + + if ( + window.confirm( + "ページ名に「" + + msg + + "」をセットします。\n" + + msg + + "編集中に切り替えます" + ) + ) { + return true; + } else { + return false; + } } // !onload function -$(function(){ - // !File Upload - $('#file_upload').fileUploadUI({ - uploadTable: $('#files'), - downloadTable: $('#files'), - buildUploadRow: function (files, index) { - return $('' + files[index].name + '<\/td>' + - '
<\/div><\/td>' + - '' + - '" + ); + }, + buildDownloadRow: function(file) { + var preview = "", + link, + target; + if (file.preview.length > 0) { + var x = file.preview.split("x").shift(), + y = file.preview.split("x").pop(); + preview = + '' +
+          file.text +
+          ''; + } + if (typeof file.id != "undefined") { + link = "view.php?id=" + file.id; + target = ""; + } else { + link = file.path; + target = ' target="_blank" rel="noopener"'; + } - // !triggers - $("#openSlideshowBox") - .each(function(){ - $(this).nextAll("div.slideshowbox").hide(); + display_buttons(); + + return $( + '' + + preview + + '" + + file.name + + "
" + + file.size + + "" + + file.buttons + + "" + ); + }, + onDragOver: function() { + $("#file_upload > div").text("ファイルのアップロードを開始します"); + }, + onDragLeave: function() { + $("#file_upload > div").text(""); + }, + onDrop: function() { + $("#file_upload > div").text(""); + } + }); + + // !triggers + $("#openSlideshowBox") + .each(function() { + $(this) + .nextAll("div.slideshowbox") + .hide(); }) - .click(function(){ - var $a = $(this); - $a.nextAll("div.slideshowbox:not(:visible)").show("fast", function(){ - $a.hide(); - }); + .click(function() { + var $a = $(this); + $a.nextAll("div.slideshowbox:not(:visible)").show("fast", function() { + $a.hide(); + }); - return false; + return false; }); - // keyboard shortcut - shortcut.add("u", function(){ + // keyboard shortcut + shortcut.add( + "u", + function() { if ($("#swfu_fileupload").length > 0) { $("#swfu_fileupload").click(); } else { location.href = $("#upload_link").attr("href"); } - }, { + }, + { disable_in_input: true - }); + } + ); - $(document).keydown(function(e){ - if (e.keyCode == 27) { - if (window.parent) { - window.parent.tb_remove(); - } + $(document).keydown(function(e) { + if (e.keyCode == 27) { + if (window.parent) { + window.parent.tb_remove(); } - }); + } + }); - // focus - setTimeout(function(){ - $(window).focus(); - }, 300); + // focus + setTimeout(function() { + $(window).focus(); + }, 300); });