File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -537,7 +537,12 @@ function createBreakageNote(domain, i18n_message_key) {
537537 // return the tooltip we want (the breakage note, not Allow)
538538 $slider_allow . tooltipster ( 'destroy' ) . tooltipster ( {
539539 autoClose : false ,
540- content : chrome . i18n . getMessage ( i18n_message_key ) ,
540+ content : $ ( `<div>
541+ <a href="" id="dismiss-tooltip" role="button" aria-label="i18n_report_close">
542+ <img src="../icons/close.svg" alt="">
543+ </a>
544+ <div>${ chrome . i18n . getMessage ( i18n_message_key ) } </div>
545+ </div>` ) ,
541546 functionReady : function ( tooltip ) {
542547 // close on tooltip click/tap
543548 $ ( tooltip . elementTooltip ( ) ) . on ( 'click' , function ( e ) {
Original file line number Diff line number Diff line change @@ -59,6 +59,15 @@ function setTextDirection() {
5959 [ '#fittslaw' , '.overlay-close' ] . forEach ( ( selector ) => {
6060 toggle_css_value ( selector , "float" , "right" , "left" ) ;
6161 } ) ;
62+ // Workaround for tooltipster dynamically inserted after localization
63+ let css = document . createElement ( "style" ) ;
64+ css . textContent = `
65+ #dismiss-tooltip {
66+ float: left;
67+ right: unset;
68+ left: -5px;
69+ }` ;
70+ document . body . appendChild ( css ) ;
6271
6372 // options page
6473 } else if ( document . location . pathname == "/skin/options.html" ) {
Original file line number Diff line number Diff line change @@ -508,6 +508,24 @@ a.overlay-close:hover {
508508 cursor : pointer;
509509}
510510
511+ # dismiss-tooltip {
512+ float : right;
513+ margin : 5px ;
514+ position : relative;
515+ top : -5px ;
516+ right : -5px ;
517+ }
518+
519+ # dismiss-tooltip img {
520+ height : 18px ;
521+ filter : invert (100% ) sepia (0% ) saturate (7489% ) hue-rotate (126deg ) brightness (106% ) contrast (100% );
522+ }
523+
524+ # dismiss-tooltip : hover img , # dismiss-tooltip : focus img {
525+ /* Calculated with https://codepen.io/sosuke/pen/Pjoqqp to match #fff */
526+ filter : invert (93% ) sepia (8% ) saturate (30% ) hue-rotate (203deg ) brightness (99% ) contrast (94% );
527+ }
528+
511529# firstparty-protections-container , # youtube-message-container {
512530 border-bottom : 1px solid # d3d3d3 ;
513531 margin : 10px 0 ;
You can’t perform that action at this time.
0 commit comments