I have been trying to apply darkmode to the site, however it seems that when applied on action-view it is not reflected to action-edit pages. They seem to work on separate states, is there any way to apply a global cookie to the wiki?
Topic on Project:Support desk
you'll need to be more specific as to what precisely you are doing to add darkmode.
in WikiMedia:Common.js I have this following script
document.cookie = 'theme=darkmode'
However, this cookie is only applied to non-editor pages.
When I go to &action=edit page and type document.cookie
in the console the theme attribute is not present
you mean MediaWiki:Common.js ?
Cookies generally get saved for all pages once you set for one, until you close the browser. Are your edit pages somehow on a different domain? Check for javascript errors in developer console.
I have circumvented the issue by using localStorage instead of document.cookie