soscripted / sox

Stack Overflow Extras: a userscript for the Stack Exchange websites to add a bunch of optional toggle-able features
http://stackapps.com/q/6091/
MIT License
72 stars 15 forks source link

"hover to show spoiler" is broken #443

Closed LunarWatcher closed 4 years ago

LunarWatcher commented 4 years ago

Describe the bug The "hover to show spoiler" thingy (https://github.com/soscripted/sox/blob/8a8e5e987c2105cbf2a9abd6cfb9b2958bbbc2be/sox.features.js#L550) is broken because it's caught by a SO CSS rule.:

.spoiler:not(:hover) > * {
    opacity: 0;
}

To Reproduce Steps to reproduce the behaviour:

  1. Go to https://meta.stackexchange.com/a/333638
  2. Notice the missing "hover to show spoiler"
  3. Hover
  4. See the blockquote shrink

SOX errors logged in console Not applicable

Expected behaviour To have the text rendered.

Screenshots/GIFs

bilde

Disabling the rule makes the text render again, but breaks the spoiler.

Suggested fix:

#isSpoiler {
    opacity: 1 !important;
}

Environment SOX version: 2.6.6DEV Platform: Tampermonkey


Features Enabled

["Appearance-addAuthorNameToInboxNotifications","Appearance-alignBadgesByClass","Appearance-answerTagsSearch","Appearance-colorAnswerer","Appearance-displayName","Appearance-dragBounty","Appearance-highlightQuestions","Appearance-isQuestionHot","Appearance-localTimestamps","Appearance-markEmployees","Appearance-metaChatBlogStackExchangeButton","Appearance-metaNewQuestionAlert","Appearance-scrollToTop","Appearance-spoilerTip","Appearance-standOutDupeCloseMigrated","Appearance-tabularReviewerStats","Appearance-unspoil","Appearance-addTimelineAndRevisionLinks","Appearance-showTagWikiLinkOnTagPopup","Appearance-hideWelcomeBackMessage","Appearance-hideHowToAskWhenZoomed","Appearance-openImagesAsModals","Comments-autoShowCommentImages","Comments-commentReplies","Comments-commentShortcuts","Comments-confirmNavigateAway","Comments-showCommentScores","Comments-hiddenCommentsIndicator","Comments-onlyShowCommentActionsOnHover","Editing-addSBSBtn","Editing-editComment","Editing-editReasonTooltip","Editing-findAndReplace","Editing-kbdAndBullets","Editing-titleEditDiff","Editing-inlineEditorEverywhere","Flags-flagOutcomeTime","Flags-flagPercentages","Flags-flagPercentageBar","Sidebar-hideCommunityBulletin","Sidebar-hideJustHotMetaPosts","Sidebar-hideHireMe","Sidebar-hideChatSidebar","Sidebar-hideLoveThisSite","Sidebar-linkedToFrom","Sidebar-hotNetworkQuestionsFiltering","Sidebar-addTagsToHNQs","Chat-chatEasyAccess","Chat-replyToOwnChatMessages","Chat-renameChat","Chat-scrollChatRoomsList","Voting-betterCSS","Voting-stickyVoteButtons","Voting-disableVoteButtons","Extras-linkedPostsInline","Extras-parseCrossSiteLinks","Extras-quickAuthorInfo","Extras-shareLinksPrivacy","Extras-sortByBountyAmount","Extras-warnNotLoggedIn","Extras-showMetaReviewCount","Extras-copyCode","Extras-dailyReviewBar","Extras-openLinksInNewTab","Extras-showQuestionStateInSuggestedEditReviewQueue","Extras-addOnTopicLinkToSiteSwitcher","Extras-customMagicLinks"]
shu8 commented 4 years ago

Thanks for the bug report, I've reproduced this but won't get time to fix this until a few days. I'd be happy to merge a pull request if you have any time meantime though :) your suggested fix looks great

shu8 commented 4 years ago

@LunarWatcher I just pushed a fix for this in dev 2.6.7! :)