Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Hiroto (followup question)

First, as I already posted this to that earlier thread, apologies if this is unnecessary. Posting again if you may have missed it.


One big annoyance: is it possible to remove the Helpful and Solved posts which appear on every page in a multi-page thread? They are OK on page 1, but clutter things up badly, wasting space when displayed on every page.


Thanks.

Posted on Jun 15, 2016 7:41 AM

Reply
11 replies

Jun 26, 2016 7:28 AM in response to WZZZ

Hello


Sorry for late reply. I've read your question in the other thread as well but could not reproduce the issue regarding promoted helpful replies and could not think of a way to hide promoted solved answer selectively in subsequent pages...


Now it occurs to me that you're likely using the following rule of tt2's to show all replies regardless of the internal state of helpful-replies-only or all-replies.



.all-replies-container { display: inherit !important; }




If it is the case, the persistent promoted helpful replies on top is a side effect of the rule in a use case.


If you hide the promoted helpful replies by menu (All replies | Helpful answers), you will not see them.



To hide promoted solved answer in subsequent pages is much complicated. As far as I can tell, you cannot do it by CSS but JavaScript injection. If you're using Firefox, you might install GreaseMonkey add-on to perform JavaScript injection into site scripts. It is quite powerful but not in the scope of CSS customisation.


Regards,

H

Jun 15, 2016 3:41 PM in response to Hiroto

Hi Hiroto,


Not sure if this is what you meant, but if I completely remove


.all-replies-container {display: inherit !important;} /* Display all answers */


Then, by default, I get only the Helpful, which requires an extra step to change that to All Replies to see anything else. I also tried only removing "inherit," but doesn't seem to make any difference to this behavior. If it's a choice of not seeing the redundant Solved and Helpful posts, or having to click on Helpful to see the rest, I guess I'll have to live with this annoyance. Both behaviors are annoying, but I think the extra click needed is more annoying.

Jun 17, 2016 7:06 AM in response to Hiroto

Hi Hiroto,


I suppose nothing can be done about this issue until ASC decides to remove the nonsensical feature that stops all replies being shown once there's been a Helpful.


Thanks again for all your great work on this.


(And unless it shows up later, nothing happens when I mark your reply Helpful. Go figure.)

Jun 26, 2016 7:29 AM in response to WZZZ

Hello


As I mentioned earlier, you'd need javascript to manipulate the specific behaviour consistently.


Here's a recipe you might try if you really want to, provided that you're using Firefox. Install Greasemonkey add-on [1] and create a user script with the content as listed below, which will do -


a) disable jquery animation in page scrolling; and,


b) initially show all replies and hide promoted helpful and/or recommended replies; and,


c) hide rolled-up solved or recommended answer in original post in page 2 or later.



[1] https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/




// ==UserScript== // @name ASC thread content view // @namespace bubo-bubo/gmscripts // @description ASC - disable jquery animation, initially show all replies, hide rollup solved answer in page 2 or later. // @grant unsafeWindow // @run-at document-end // @include https://discussions.apple.com/* // @include https://discussionsjapan.apple.com/* // @include https://discussionskorea.apple.com/* // @include https://discussionschinese.apple.com/* // @include https://communities.apple.com/* // @version 0.1.0 // ==/UserScript== var $ = unsafeWindow.jQuery; var watchdog1, watchdog2; var watch_interval = 250; // [ms] var re_thread = new RegExp('^https://[^/]+/thread/'); var re_thread_or_message = new RegExp('^https://[^/]+/(thread|message)/'); // disable jquery animation (globally) $.fx.off = true; // modify thread content view behaviour (in post-load phase) window.onload = function() { // register event listeners window.addEventListener('unload', function(e) { // console.log('unload is observed'); stop_watchdog(watchdog1); stop_watchdog(watchdog2); window.removeEventListener('_locationchange', _locationchange_handler, true); window.removeEventListener(e.type, arguments.callee, true); }, true); window.addEventListener('_locationchange', _locationchange_handler, true); function _locationchange_handler(e) { // console.log('_locationchange is observed'); var href = window.location.href; if ( href.match(re_thread) ) { setTimeout(show_all_replies, 100); } if ( href.match(re_thread_or_message) ) { setTimeout(hide_solved_p2, 100); } } // _locationchange watch dog var prev_href = ''; watchdog1 = setInterval( function() { // watch for location to change var curr_href = window.location.href; if (curr_href != prev_href) { // console.log('_locationchange is issued'); window.dispatchEvent(new Event('_locationchange')); prev_href = curr_href; } }, watch_interval); }; function show_all_replies() { window.addEventListener('_helpfuldisplay', function(e) { // console.log('_helpfuldisplay is observed'); $('.helpful-all-switch li.helpful').addClass('inactive').removeClass('active').hide(); $('.helpful-all-switch li.all-replies').addClass('active').removeClass('inactive').show(); $('#helpful-container').hide(); $('.all-replies-container').show(); window.removeEventListener(e.type, arguments.callee, true); }, true); watchdog2 = setInterval( function() { // watch for helpful container to appear // console.log('watchdog is active : ' + watchdog2); if ($('#helpful-container').css('display') != 'none') { // console.log('_helpfuldisplay is issued'); window.dispatchEvent(new Event('_helpfuldisplay')); stop_watchdog(watchdog2); } }, watch_interval); setTimeout(stop_watchdog, 3000, watchdog2); } function hide_solved_p2() { var u = window.location.href; var re = /[?&]start=([0-9]+)/; var m = re.exec(u); var p = m ? m[1] : 0; // console.log('current start post numebr = ' + p); var div = $('.j-answer-rollup.recommended-answers.span-full-width'); if (!div) { return; } p > 0 ? div.hide() : div.show(); } function stop_watchdog(dog) { clearInterval(dog); // console.log('watchdog is inactive : ' + dog); }




Briefly tested with Firefox 45.2.0esr and Greasemonkey 3.8 under OS X 10.6.8 but no warranties. Please try this at your own risk.


Good luck,

H

Jun 21, 2016 8:02 AM in response to Hiroto

Hey thanks Hiroto,


I already have Greasemonkey, so I will give this a try.


But in the meantime, what has helped enormously for this issue is the following from tt2:


.helpful-allreply {display: none !important;} /* Hide helpful/all reply switch */
#helpful-container {display: none !important;} /* Hide helpful block */
.all-replies-container {display: inherit !important;} /* Display all replies block */
.j-answer-rollup {display: none !important;} /* Hide solved/recommended block */

Jun 26, 2016 7:36 AM in response to WZZZ

Was finally able to award the two Helpfuls by booting to my 10.9 Safari. For some reason, even with the new CSS disabled, including everything I could think of that might be interfering (including settings in NoScript and Adblock Plus), I kept getting "JavaScript void" in the status bar whenever I tried to do this from Firefox.

Jun 28, 2016 7:21 AM in response to WZZZ

Obviously, the single tt2's rule as listed below does hide any rolled-up answers whether solved, recommended or helpful in any page not limited to page 2 or later.



@-moz-document domain(communities.apple.com), domain(discussions.apple.com), domain(discussionsjapan.apple.com), domain(discussionskorea.apple.com), domain(discussionschinese.apple.com) { .j-answer-rollup {display: none !important;} }



So if you want to remove all features regarding promoted replies and rolled-up replies, the four tt2's rules as listed below should suffice and there's no need to employ javascript to manipulate the behaviour thereof, for the features are gone.



@-moz-document domain(communities.apple.com), domain(discussions.apple.com), domain(discussionsjapan.apple.com), domain(discussionskorea.apple.com), domain(discussionschinese.apple.com) { .helpful-allreply {display: none !important;} #helpful-container {display: none !important;} .all-replies-container {display: inherit !important;} .j-answer-rollup {display: none !important;} }



Regards,

H

Hiroto (followup question)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.