dgutov / bmreplace

Quickly replace an existing bookmark in Mozilla Firefox
https://addons.mozilla.org/en-US/firefox/addon/bmreplace/
MIT License
24 stars 3 forks source link

Specific url #22

Closed BarbieBarb closed 10 years ago

BarbieBarb commented 10 years ago

Thankyou for Replace Bookmark.

If there are bookmarks for these pages http://example.com/12345/page5 and http://example.com/6789/page5 I only want http://example.com/12345/page5 to appear in the Replace Bookmark popup. But both of them show up. How can I set for only the first one to appear and not anymore... because some I have about 20 appear and that is too much clutter to sort through. Thankyou.

    Testing tags Your text description here Link here

Test bold Test italic Test strikethrough     In the words of Someone:

We're living the future so the present is our past. .

. . . I think you should use an <addr> element here instead.

  2 function test() { console.log("notice the blank line before this function?"); }

 3

function test() {
  console.log("notice the blank line before this function?");
}

 4

function test() {
  console.log("notice the blank line before this function?");
}

body
{background: lightgrey !important;
font-family: "arial" !important;}

dgutov commented 10 years ago

How would it know which ones to hide?

BarbieBarb commented 10 years ago

Because there IS A DIFFERENCE.

http://example.com/12345/page5 http://example.com/6789/page5 Your text description here

I only want http://example.com/12345/ NOT THIS http://example.com/6789/

Thankyou for response.

dgutov commented 10 years ago

Yes, but different websites have different addressing schemes.

Youtube, for example, makes all urls different, so if one is tracking a web series, we have to look at the page title to find the related bookmark.

fanfiction.net is more predictable: it changes only one segment in the url between chapters, but it's not the last one.

Some pages may also add tracking cookies at the end of the url.

What's the exact filtering algorithm you're proposing?

Would you be satisfied with better sorting instead?

BarbieBarb commented 10 years ago

I don't want to say the exact website. This particular website has this exact scheme for all it's pages that I have bookmarked. So let's pretend the website is particularwebsite.com

TO DEMONSTRATE: IN OPTIONS: I'd like to be able to type in a specific listing: http://particularwebsite.com/12345/ so that it would not also list htt;//particularwebsite.com/64816/ htt;//particularwebsite.com/35244/ htt;//particularwebsite.com/94516/ htt;//particularwebsite.com/513323/ htt;//particularwebsite.com/281191/ htt;//particularwebsite.com/85599/ htt;//particularwebsite.com/72545/ htt;//particularwebsite.com/18526/ htt;//particularwebsite.com/467782/ htt;//particularwebsite.com/39415/*

You know how Greasemonkey firefox addon is. It can include urls and exclude urls.

dgutov commented 10 years ago

In other words, limit suggestions from particularwebsite.com to only urls where paths start with /12345/, no matter which page you're on? That sounds very particular to your workflow.

Not sure if I want to implement that, partly because I wouldn't know what to call that section in preferences. And also because adding new widgets to prefs is unlikely to be easy.

Wouldn't you want to try to improve the sorting algorithm, so that pages with urls starting with http://particularwebsite.com/12345/ are displayed in the beginning of the list if the current page url also starts with it? In that case, I'd need more details though, like specific urls (maybe without the domain name). You could post them in the comment end then immediately delete it, in order not to leave the information for all to see, or look for another, more generic website that exhibits the same problem you have here.

BarbieBarb commented 10 years ago

TO EXPLAIN: It is just a website of many threads of stories. There is just the one that I read through everyday and need to re-bookmark several times a day.

After http://particularwebsite.com/12345/ is just the page number like this:

Page 5 http://particularwebsite.com/12345/5

Page 10 http://particularwebsite.com/12345/10

Page 21 http://particularwebsite.com/12345/21

The other threads that I DON'T WANT INCLUDED are like this: Page 5 http://particularwebsite.com/64816/5

Page 10 http://particularwebsite.com/64816/10

Page 21 http://particularwebsite.com/64816/21

And so on... and so on...

I am so happy for having your addon the way it is... but would just like it to have this more specific exclusion to be even better for me. It seemed simple to me but I cannot know if so. I thought there could be an input box like this where it could say only show these specific strings. http://particularwebsite.com/12345/* Your text description here

If it is too difficult or time consuming then forget it of course... but if possible with how I have explained above would be great. But I would think that some others (out of the 1,200 that have already downloaded this addon... and many more to come) may have some need for an exclusion set up too. Thankyou.

dgutov commented 10 years ago

but would just like it to have this more specific exclusion to be even better for me.

I'll think about it. But:

I would expect that when you have, say, http://particularwebsite.com/12345/5 bookmarked, and you activate Replace Bookmark while on http://particularwebsite.com/12345/21, the former url would be at the top of the list of the suggested bookmarks to replace, so you won't have to pay much attention to the other stories. www.fanfiction.net works this way for me, except there are several stories I follow.

Isn't this how it happens for you? If not, do you have any idea why?

BarbieBarb commented 10 years ago

Yes you are right. It is at the very top. Before I had a duplicate that confused me. I deleted the duplicate. The rest listed is clutter. Maybe I can get rid of it with CSS. I know CSS. I use Stylish firefox addon. Can't get the ID for the menuitems though. And this is not good code nor does it work. EXAMPLE menuitem[label="Example Bookmark item"], menuitem[label^="github"] {display:none!important;}

Do you have ID for the menuitems and I can keep :first-child ?

dgutov commented 10 years ago

Do you have ID for the menuitems and I can keep :first-child?

I'll get back to you on that. Maybe I'll add some additional attribute or two, so your rules can filter by domain names or urls.

BarbieBarb commented 10 years ago

Thankyou dgutov. Hoping so. That would be great! I will be checking for updates.

In closing... just to say: ● I didn't know about markdown. So I put this button together for this github site. If anyone has trouble remembering the Markdown tags or don't understand it, they can easily use this button with Firefox Addon Custombuttons.

● Because of your javascript abilities, If you ever have spare time, maybe consider writing up a simple button through Custombuttons that you would like for yourself, and share it with all others. That would be wonderful for so many.

Custombuttons install database (more than 600 buttons) here Many More Installable Custombuttons (where you post new buttons) here

Thankyou

dgutov commented 10 years ago

Let's keep this open until the new version is written and released.

dgutov commented 10 years ago

I'll push the next version soon. With it installed, the following style should work:

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

#list[data-addon="bmreplace"][data-domain="yandex.ru"] listitem:not(:first-child) {
  display: none;
}

Replace yandex.ru with particularwebsite.com.

BarbieBarb commented 10 years ago

Okay thankyou dgutov. WindowsVista Firefox27

Will wait and test with newer version when released.

dgutov commented 10 years ago

It's published now. It won't show up on the main page until after the review, but you can install it now from the versions page, if you like:

https://addons.mozilla.org/en-US/firefox/addon/bmreplace/versions/

BarbieBarb commented 10 years ago

Your text description here

Your text description here

Version 1.5.4 Code works! I also replaced yandex.ru with a5.example.com for another website and it works!

`@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

list[data-addon="bmreplace"][data-domain="yandex.ru"] listitem:not(:first-child) {

display: none !important;}`

Thankyou very much dgutov! PS: Also see Keyboard shortcut with "None" selection. Thankyou!

EDIT: I already gave my review at addons.mozilla.org (username "Barbiegirl").

dgutov commented 10 years ago

No problem. Thanks for testing.