Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(AdvancedSiteNotices): use existing variables #416

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/AdvancedSiteNotices/modules/constant.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const AJAX_PAGE_TITLE = 'Template:AdvancedSiteNotices/ajax';
const CLASS_NOTICES_AREA = 'gadget-advanced_site_notices__area';
const CLASS_NOTICES_DISMISS = 'gadget-advanced_site_notices__dismiss';
const CLASS_NOTICES_NOTICE = 'gadget-advanced_site_notices__notice';
const CLASS_NOTICES_NOTICE_AREA = 'gadget-advanced_site_notices__notice__area';
const CLASS_NOTICES_TITLE = 'gadget-advanced_site_notices__title';

const CLASS_NOTICES = 'gadget-advanced_site_notices';
const CLASS_NOTICES_AREA = `${CLASS_NOTICES}__area`;
const CLASS_NOTICES_DISMISS = `${CLASS_NOTICES}__dismiss`;
const CLASS_NOTICES_NOTICE = `${CLASS_NOTICES}__notice`;
const CLASS_NOTICES_NOTICE_AREA = `${CLASS_NOTICES_NOTICE}__area`;
const CLASS_NOTICES_TITLE = `${CLASS_NOTICES}__title`;

const STORAGE_KEY = 'ext.gadget.AdvancedSiteNotices_dismissASN';

const WG_ACTION: string = mw.config.get('wgAction');
Expand Down