Skip to content

Commit

Permalink
fix(google): follow updates of Google SERP and wedata/AutoPagerize
Browse files Browse the repository at this point in the history
  • Loading branch information
iorate committed Mar 22, 2020
1 parent 03fb4f1 commit 99cd3d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
31 changes: 3 additions & 28 deletions src/scripts/engines/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ if (!mobile({ tablet: true })) {
{
getDynamicElements: getDynamicElements('.yl > div', '.YwonT'),
},
// AutoPagerize
{
getDynamicElements: getDynamicElements(
'.autopagerize_page_info + #res, .autopagerize_page_info ~ .bkWMgd',
'.g',
),
},
],
},
// Books
Expand All @@ -150,15 +143,6 @@ if (!mobile({ tablet: true })) {
createAction: createActionUnder('ub-pc-books-general-action', '.eFM0qc'),
},
],
dynamicElementHandlers: [
// AutoPagerize
{
getDynamicElements: getDynamicElements(
'.autopagerize_page_info + #res, .autopagerize_page_info + .bkWMgd',
'.Yr5TG, .g',
),
},
],
},
// Images
isch: {
Expand Down Expand Up @@ -197,7 +181,7 @@ if (!mobile({ tablet: true })) {
{
getEntry: getEntry('.gG0TJc'),
getURL: getURL('.l'),
createAction: createActionUnder('ub-pc-news-general-action-japanese', '.slp'),
createAction: createActionUnder('ub-pc-news-general-action-japanese', '.dhIWPd, .slp'),
adjustEntry: entry => {
const image = entry.parentElement!.querySelector('.top');
if (!image || image.querySelector('.Y6GIfb')) {
Expand Down Expand Up @@ -239,8 +223,8 @@ if (!mobile({ tablet: true })) {
dynamicElementHandlers: [
{
getDynamicElements: getDynamicElements(
'.autopagerize_page_info + #res, .autopagerize_page_info + .bkWMgd',
'#rso > div, .gG0TJc, .YiHbdc, .ErI7Gd, .top',
'.autopagerize_page_info ~ .g',
'.gG0TJc, .YiHbdc, .ErI7Gd, .top',
),
},
],
Expand All @@ -260,15 +244,6 @@ if (!mobile({ tablet: true })) {
createAction: createActionUnder('ub-pc-videos-general-action', '.r'),
},
],
dynamicElementHandlers: [
// AutoPagerize
{
getDynamicElements: getDynamicElements(
'.autopagerize_page_info + #res, .autopagerize_page_info + .bkWMgd',
'.g',
),
},
],
},
};
// #endregion PC
Expand Down
1 change: 1 addition & 0 deletions src/styles/engines/google.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

&-general-action-fallback {
font-size: 14px;
margin-top: 4px;
}

&-latest-action {
Expand Down

0 comments on commit 99cd3d9

Please sign in to comment.