mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
c4ea36cfde
refs https://github.com/TryGhost/Team/issues/1804 - Adds a script that is only injected when the member attribution alpha flag is enabled - This script builds a history and saves it in localStorage as `ghost-history` that contains something like this: ``` json [ { "time": 1660650730, "path": "/about/" }, { "time": 1660651730, "path": "/welcome/" } ] ``` - Keeps track of the time of every page visit, so we can correctly remove old items. I also considered saving the time separately and clearing the whole history when the saved time is older than 24h, but that would have the side effect that items older than 24h might leak into the history if you visit every 12 hours (to give an example). Plus, having objects in the history might make it easier to add other attributes to the items if we ever want to do that in the future. We also have access to the time between visits. - Added `.eslintrc` configuration for this new frontend script. This makes it easier to spot errors when developing, and follow the same syntax rules as other scripts. In the future it can allow us to require an older ECMA version in the browser script. If we like this pattern, we could also use it for other frontend scripts. |
||
---|---|---|
.. | ||
adapter-manager | ||
admin | ||
api-framework | ||
api-version-compatibility-service | ||
bootstrap-socket | ||
constants | ||
core | ||
custom-theme-settings-service | ||
domain-events | ||
email-analytics-provider-mailgun | ||
email-analytics-service | ||
email-content-generator | ||
express-dynamic-redirects | ||
extract-api-key | ||
html-to-plaintext | ||
job-manager | ||
magic-link | ||
mailgun-client | ||
member-analytics-service | ||
member-events | ||
members-analytics-ingress | ||
members-api | ||
members-csv | ||
members-events-service | ||
members-importer | ||
members-ssr | ||
minifier | ||
mw-api-version-mismatch | ||
mw-cache-control | ||
mw-error-handler | ||
mw-session-from-token | ||
mw-update-user-last-seen | ||
mw-vhost | ||
oembed-service | ||
offers | ||
package-json | ||
payments | ||
security | ||
session-service | ||
settings-path-manager | ||
stripe | ||
update-check-service | ||
verification-trigger | ||
version-notifications-data-service |