[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #12684 [Firefox Patch Issues]: Make "Not Now" the default button for TorBrowser's canvas permission dialogue



#12684: Make "Not Now" the default button for TorBrowser's canvas permission
dialogue
-------------------------------------+-------------------------------------
     Reporter:  isis                 |      Owner:  mikeperry
         Type:  defect               |     Status:  needs_review
     Priority:  critical             |  Milestone:
    Component:  Firefox Patch        |    Version:
  Issues                             |   Keywords:  tbb-usability, tbb-
   Resolution:                       |  linkability, MikePerry201408R,
Actual Points:                       |  TorBrowserTeam201408
       Points:                       |  Parent ID:
-------------------------------------+-------------------------------------

Comment (by mcs):

 Replying to [comment:18 isis]:
 > Problem !#1: That `<separator class="groove">` part between the
 sentences. For the life of me, I can't get this thing to insert a newline.
 I've tried `\n\n`, a [https://developer.mozilla.org/en-
 US/docs/Mozilla/Tech/XUL/separator XUL separator] and a
 [https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/spacer XUL
 spacer]. All of them actually show up in the text.

 The text ends up in a XUL <description> element.  If we can apply a CSS
 rule like white-space: pre-wrap, then newlines (\n) will not be ignored.
 There might be a better way, but here is something that seems to work:
 add the following code to the CanvasPermissionPromptHelper_init()
 function:
 {{{
 if (document.styleSheets && (document.styleSheets.length > 0)) try {
   let ruleText = "panel[popupid=canvas-permissions-prompt] description {
 white-space: pre-wrap";
   let sheet = document.styleSheets[0];
   sheet.insertRule(ruleText, sheet.cssRules.length);
 } catch (e) {}

 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12684#comment:21>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs