From d53393ed8d3bd96f0f524e93b89e68a3b423b7eb Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Tue, 12 Nov 2019 21:04:29 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E7=89=B9=E5=AE=9A=E3=81=AE=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E4=B8=8B=E3=81=A7=E3=83=94=E3=83=83=E3=82=AF=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=81=97=E3=81=9F=E3=82=B9=E3=83=AC=E3=81=AB?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=84=E3=83=9D=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=82=A2=E3=83=83=E3=83=97=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- futaba_thread_highlighter.user.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/futaba_thread_highlighter.user.js b/futaba_thread_highlighter.user.js index 8f7d3c6..c726d54 100644 --- a/futaba_thread_highlighter.user.js +++ b/futaba_thread_highlighter.user.js @@ -119,6 +119,7 @@ this.$ = this.jQuery = jQuery.noConflict(true); $("#GM_fth_config_container").fadeOut(100); highlight(true); pickup_opened_threads(); + notifyPickup(); /* * 板毎の個別検索ワードを保存 */ @@ -405,6 +406,8 @@ this.$ = this.jQuery = jQuery.noConflict(true); if ($("#cat_search").length) { // ふたクロ highlight(); + pickup_opened_threads(); + notifyPickup(); target = $("#cattable").get(0); config = { attributes: true , attributeFilter: ["style"] }; } From 1562209ead2525b440dfbdab43b8670a201aaf51 Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Tue, 12 Nov 2019 21:06:10 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E3=83=AC=E3=82=A4=E3=82=A2?= =?UTF-8?q?=E3=82=A6=E3=83=88=E3=81=AE=E3=83=94=E3=83=83=E3=82=AF=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=81=8B=E3=82=89=E3=82=B9=E3=83=AC=E3=82=92?= =?UTF-8?q?=E9=96=8B=E3=81=84=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AB=E5=88=A5?= =?UTF-8?q?=E3=81=AE=E3=82=BF=E3=83=96=E3=81=AB=E9=96=8B=E3=81=8F=E4=B8=8D?= =?UTF-8?q?=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- futaba_thread_highlighter.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/futaba_thread_highlighter.user.js b/futaba_thread_highlighter.user.js index c726d54..acffe10 100644 --- a/futaba_thread_highlighter.user.js +++ b/futaba_thread_highlighter.user.js @@ -646,8 +646,8 @@ this.$ = this.jQuery = jQuery.noConflict(true); $clone.children(".KOSHIAN_image_popup_container").replaceWith(); // aタグがクリックされたらカタログのaタグをクリックする - $clone.children("a").click((e) => { - var origin_anchor = $(this).children("a:first").get(0); + $clone.find("a").click((e) => { + var origin_anchor = $(this).find("a:first").get(0); if (origin_anchor) { origin_anchor.click(); e.preventDefault(); @@ -770,8 +770,8 @@ this.$ = this.jQuery = jQuery.noConflict(true); $clone.children(".KOSHIAN_image_popup_container").replaceWith(); // aタグがクリックされたらカタログのaタグをクリックする - $clone.children("a").click((e) => { - var origin_anchor = $(this).children("a:first").get(0); + $clone.find("a").click((e) => { + var origin_anchor = $(this).find("a:first").get(0); if (origin_anchor) { origin_anchor.click(); e.preventDefault(); From fc0ce146dfcb2db8233abb5240a1e3527a3efaa9 Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Tue, 12 Nov 2019 21:11:08 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=82=BB=E3=83=AC=E3=82=AF=E3=82=BF?= =?UTF-8?q?=E3=83=BB=E3=83=84=E3=83=AA=E3=83=BC=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- futaba_thread_highlighter.user.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/futaba_thread_highlighter.user.js b/futaba_thread_highlighter.user.js index acffe10..4ce237f 100644 --- a/futaba_thread_highlighter.user.js +++ b/futaba_thread_highlighter.user.js @@ -500,7 +500,7 @@ this.$ = this.jQuery = jQuery.noConflict(true); return; } - var target = isNewLayout ? $("#cattable .cs") : $("#cattable td"); + var target = isNewLayout ? $("#cattable > .cs") : $("#cattable td"); var config = { attributes: true , attributeFilter: ["style"] }; // オブザーバインスタンスが既にあれば事前に解除 if (openedThreadObserver) { @@ -527,7 +527,7 @@ this.$ = this.jQuery = jQuery.noConflict(true); if ($(".akahuku_markup_catalog_table").length) { // 赤福の既読マーク - target = isNewLayout ? $("#cattable .cs .cu a[style]") : $("#cattable td a[style]"); + target = isNewLayout ? $("#cattable .cu a[style]") : $("#cattable td a[style]"); config = { attributes: true, attributeFilter: ["class"] }; for (var j = 0; j < target.length; ++j) { openedThreadObserver.observe(target[j], config); @@ -564,12 +564,12 @@ this.$ = this.jQuery = jQuery.noConflict(true); if( words !== "" ) { removeOldHighlighted(); if (isNewLayout) { - $("#cattable .cu").each(function() { + $("#cattable > .cs").each(function() { var matches = $(this).get(0).innerText.match(/([^\n]+)\n/); if( matches && matches[1].match(re) && - ($(this).parent(".cs").attr("class") + "").indexOf("GM_fcn_ng_") == -1 && // 「futaba catalog NG」NGスレ - ($(this).parent(".cs").attr("style") + "").indexOf("display: none") == -1 && // NGスレ - ($(this).children("small").attr("style") + "").indexOf("display: none") == -1 ) { // 「合間合間に」NGスレ + ($(this).attr("class") + "").indexOf("GM_fcn_ng_") == -1 && // 「futaba catalog NG」NGスレ + ($(this).attr("style") + "").indexOf("display: none") == -1 && // NGスレ + ($(this).children("cu").children("small").attr("style") + "").indexOf("display: none") == -1 ) { // 「合間合間に」NGスレ /* 新レイアウトでは検索ワードのハイライトは無効 if ( !$(this).children(".GM_fth_matchedword").length ) { $(this).html($(this).html().replace(re, @@ -578,14 +578,14 @@ this.$ = this.jQuery = jQuery.noConflict(true); "")); } */ - $(this).parent(".cs").addClass("GM_fth_highlighted"); + $(this).addClass("GM_fth_highlighted"); } }); } else { $("#cattable td small").each(function() { if( $(this).text().match(re) && - ($(this).parent("td").attr("class") + "").indexOf("GM_fcn_ng_") == -1 && // 「futaba catalog NG」NGスレ - ($(this).parent("td").attr("style") + "").indexOf("display: none") == -1 && // NGスレ + ($(this).closest("td").attr("class") + "").indexOf("GM_fcn_ng_") == -1 && // 「futaba catalog NG」NGスレ + ($(this).closest("td").attr("style") + "").indexOf("display: none") == -1 && // NGスレ ($(this).attr("style") + "").indexOf("display: none") == -1 ) { // 「合間合間に」NGスレ if ( !$(this).children(".GM_fth_matchedword").length ) { $(this).html($(this).html().replace(re, @@ -640,10 +640,10 @@ this.$ = this.jQuery = jQuery.noConflict(true); $clone.children("br").replaceWith(); } // 「合間合間に」のボタンを削除 - $clone.children("small.aima_aimani_generated").replaceWith(); + $clone.find("small.aima_aimani_generated").replaceWith(); // 「KOSHIAN 画像をポップアップで表示 改」のポップアップを削除 - $clone.children(".KOSHIAN_image_popup_container").replaceWith(); + $clone.find(".KOSHIAN_image_popup_container").replaceWith(); // aタグがクリックされたらカタログのaタグをクリックする $clone.find("a").click((e) => { @@ -732,10 +732,10 @@ this.$ = this.jQuery = jQuery.noConflict(true); "[class *= 'GM_fcn_ng_']"; // futaba catalog NG if ($(".akahuku_markup_catalog_table").length) { // 赤福の既読スレ - opened = isNewLayout ? $("#cattable .cs:has('a.akahuku_visited'):not(" + filter + ")") : $("#cattable td:has('a.akahuku_visited'):not(" + filter + ")"); + opened = isNewLayout ? $("#cattable > .cs:has('a.akahuku_visited'):not(" + filter + ")") : $("#cattable td:has('a.akahuku_visited'):not(" + filter + ")"); } else { // 既読スレ - opened = isNewLayout ? $("#cattable .cs[style]:not(" + filter +")") : $("#cattable td[style]:not(" + filter +")"); + opened = isNewLayout ? $("#cattable > .cs[style]:not(" + filter +")") : $("#cattable td[style]:not(" + filter +")"); } // OPENED_THREAD_MARKER_STYLEが未設定でKOSHIANカタログマーカー改v2以外のマークならスタイルをコピー if (opened.length && !openedThreadCssText && !opened.first().attr("opened")) { @@ -764,10 +764,10 @@ this.$ = this.jQuery = jQuery.noConflict(true); $clone.children("br").replaceWith(); } // 「合間合間に」のボタンを削除 - $clone.children("small.aima_aimani_generated").replaceWith(); + $clone.find("small.aima_aimani_generated").replaceWith(); // 「KOSHIAN 画像をポップアップで表示 改」のポップアップを削除 - $clone.children(".KOSHIAN_image_popup_container").replaceWith(); + $clone.find(".KOSHIAN_image_popup_container").replaceWith(); // aタグがクリックされたらカタログのaタグをクリックする $clone.find("a").click((e) => { From f14720d871035431791321ce9f1860aca1b2916d Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Tue, 12 Nov 2019 21:13:34 +0900 Subject: [PATCH 4/5] =?UTF-8?q?README.md=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a093134..6fddd19 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,9 @@ himuro\_majika氏作のユーザースタイルシートも使ってみてくだ [futaba\_catalog\_mod(クラシックバージョン)](https://userstyles.org/styles/114130/futaba-catalog-mod-classic) ## 更新履歴 +* v1.6.6rev27 2019-11-12 + - 特定の条件下でピックアップしたスレにボタンやポップアップが表示されない不具合を修正 + - 赤福ExtendedやKOSHIAN タブ制御で新レイアウトのピックアップからスレを開いたときに別のタブに開く不具合を修正 * v1.6.6rev26 2019-11-11 - 新レイアウトのカタログに暫定対応 * v1.6.6rev25 2019-09-06 From f9b3910f189a8975f14dccdeb46aac3b803dbcfd Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Tue, 12 Nov 2019 21:14:59 +0900 Subject: [PATCH 5/5] v1.6.6rev27 --- futaba_thread_highlighter.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/futaba_thread_highlighter.user.js b/futaba_thread_highlighter.user.js index 4ce237f..c4249ae 100644 --- a/futaba_thread_highlighter.user.js +++ b/futaba_thread_highlighter.user.js @@ -4,7 +4,7 @@ // @description スレ本文を検索してカタログでスレッド監視しちゃう // @include http://*.2chan.net/*/futaba.php?mode=cat* // @include https://*.2chan.net/*/futaba.php?mode=cat* -// @version 1.6.6rev26 +// @version 1.6.6rev27 // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js // @grant GM_registerMenuCommand // @grant GM_getValue