Skip to content

Add @document menus to Insert menu#238

Open
yfdyh000 wants to merge 1 commit into
stylish-userstyles:masterfrom
yfdyh000:insert_document_menus
Open

Add @document menus to Insert menu#238
yfdyh000 wants to merge 1 commit into
stylish-userstyles:masterfrom
yfdyh000:insert_document_menus

Conversation

@yfdyh000

@yfdyh000 yfdyh000 commented Sep 7, 2015

Copy link
Copy Markdown
Contributor

I hope that users can easily understand and access these matching.

https://developer.mozilla.org/en-US/docs/Web/CSS/@document
https://github.com/JasonBarnabe/stylish/wiki/Valid-@-moz-document-rules

Due to a Mozilla quirk, I can not gracefully handle the accesskeys for like "For Domain" or "_@_document url", so I use the "rule" of crappy as menu labels.

We can put them in a sub-menu, but it looks is not necessary, we have plenty of space, and save a operation.

@JasonBarnabe

Copy link
Copy Markdown
Contributor

I don't think this is very useful. To be useful, I would say:

  1. It should prompt the user for what they want to do, at least asking if they want that specific URL, URLs starting with that, all URLs on that domain. For extra fanciness you could let them generate and test a regexp.
  2. It should insert it at the caret position, and if there's a selection, it should surround it with the block. Bonus points for ensuring that it's in a valid spot.
  3. Even more bonus points: being able to edit an existing -moz-document.

@yfdyh000

Copy link
Copy Markdown
Contributor Author

It is an code with individual view, I never able to remember them.

  1. a prompt? This may increase the complexity while user input. For a regex tester, I feel it should not be repeated achieve in the internal.
  2. A hacking tip, but I guess it might scare the user's knowledge. This is a simple insert, I don't want it to become an intelligent tool, although it is possible.
  3. Sounds good, but what is more? a default values? menu order? show/hide?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants