after #708 was merged, if a date change message is
injected underneath the read marker the read
marker would be one line too low. Now, the read
marker will adjust properly when a date change
message is injected above and below the read
marker.
thanks lorenzhs for spotting that
If Service Workers are available use them to display notifications
instead of the old way of creating notifications directly.
This has the side effect that it works nicely on chrome on android which
the old method does not.
This also paves the way to set up GCM for push notification in the
future which can give us push notifications without having the app running.
This patch can be improved in the future to get existing notifications
and change the message instead of just adding more and more
notifications.
See: ServiceWorkerRegistration.getNotifications() and
ServiceWorkerRegistration.update() from
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration
Usage: fetchConfValue('weechat.look.buffer_time_format')
will result in models.wconfig['weechat.look.buffer_time_format'] to be
set when the result returns from WeeChat.
Could maybe be extended to also call a callback when it's available if
needed.
For one day later: Friday (November 27) (examples in en-US)
For n>1 days: Friday (November 27, 2 days later)
For n<0 days: Friday (November 27, 1 day before)
For different years: Friday (November 27, 2015, 2156 days later)
This commit changes the plugins that uses angular.element to load
resources directly to instead return a function that runs
angular.element. When the browser runs angular.element('<img>') and gets
a src attr it will fetch the content in the src. This makes the
browser running gb automatically fetch all plugin content that gets
linked even if the user didn't request it.
Maybe we could change our plugin architecture to split the match
function and the generator functions so this could be solved more
elegantly.
This is still technically a hack, the elements should really be defined in a view with templates, but it fixes the issue with sanitize where it can't sanitize if it can't parse HTML.