| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
'use strict'; |
| 10 |
|
| 11 |
const MinervaPage = require( './minerva_page' ); |
| 12 |
|
| 13 |
class ArticlePage extends MinervaPage { |
| 14 |
get contributions_link_element() { |
| 15 |
return $( '.page-actions-menu .menu__item--page-actions-contributions' ); |
| 16 |
} |
| 17 |
|
| 18 |
get watch_element() { |
| 19 |
return $( '#ca-watch' ); |
| 20 |
} |
| 21 |
|
| 22 |
get reference_element() { |
| 23 |
return $( 'sup a' ); |
| 24 |
} |
| 25 |
|
| 26 |
get drawer_reference_element() { |
| 27 |
return $( '.drawer sup a' ); |
| 28 |
} |
| 29 |
|
| 30 |
get talk_tab_element() { |
| 31 |
return $( '.minerva__tab-container a[rel="discussion"]' ); |
| 32 |
} |
| 33 |
|
| 34 |
get mask_element() { |
| 35 |
return $( '.mw-mf-page-center__mask' ); |
| 36 |
} |
| 37 |
|
| 38 |
get drawer_mask_element() { |
| 39 |
return $( '.drawer-container__mask--visible' ); |
| 40 |
} |
| 41 |
|
| 42 |
get watched_element() { |
| 43 |
return $( '.minerva-icon--unStar' ); |
| 44 |
} |
| 45 |
|
| 46 |
get menu_button_element() { |
| 47 |
return $( '#mw-mf-main-menu-button' ); |
| 48 |
} |
| 49 |
|
| 50 |
get search_icon_element() { |
| 51 |
return $( '#searchIcon' ); |
| 52 |
} |
| 53 |
|
| 54 |
get menu_element() { |
| 55 |
return $( 'nav' ); |
| 56 |
} |
| 57 |
|
| 58 |
get user_links_element() { |
| 59 |
return $( '.user-links' ); |
| 60 |
} |
| 61 |
|
| 62 |
get notifications_button_element() { |
| 63 |
return $( '#pt-notifications-alert' ); |
| 64 |
} |
| 65 |
|
| 66 |
get drawer_element() { |
| 67 |
return $( '.drawer' ); |
| 68 |
} |
| 69 |
|
| 70 |
get edit_link_element() { |
| 71 |
return $( '#ca-editsource, #ca-createsource, #ca-edit, #ca-create' ); |
| 72 |
} |
| 73 |
|
| 74 |
get first_heading_element() { |
| 75 |
return $( 'h1.mw-first-heading' ); |
| 76 |
} |
| 77 |
|
| 78 |
get notification_element() { |
| 79 |
return $( '.mw-notification-area .mw-notification' ); |
| 80 |
} |
| 81 |
|
| 82 |
get overlay_heading_element() { |
| 83 |
return $( '.overlay-title h2' ); |
| 84 |
} |
| 85 |
|
| 86 |
get overlay_category_topic_item_element() { |
| 87 |
return $( '.topic-title-list li' ); |
| 88 |
} |
| 89 |
|
| 90 |
get red_link_element() { |
| 91 |
return $( '#mw-content-text a.new' ); |
| 92 |
} |
| 93 |
|
| 94 |
get is_authenticated_element() { |
| 95 |
return $( 'body.is-authenticated' ); |
| 96 |
} |
| 97 |
|
| 98 |
get last_modified_bar_history_link_element() { |
| 99 |
return $( 'a.last-modified-bar__text[href*=\'Special:History\']' ); |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
module.exports = new ArticlePage(); |