Browse Source

hide newly introduced highlight of retweet header

Mike L 3 years ago
parent
commit
763f47d015
3 changed files with 3 additions and 0 deletions
  1. 1 0
      dist/webshot.js
  2. 0 0
      dist/webshot.js.map
  3. 2 0
      src/webshot.ts

+ 1 - 0
dist/webshot.js

@@ -155,6 +155,7 @@ class Webshot extends CallableInstance {
                     })
                         .then(() => utils_1.chainPromises(morePostProcessings.map(func => () => func(page))))
                         .then(() => util_1.promisify(setTimeout)(getTimeout()))
+                        .then(() => page.evaluate(() => document.activeElement.blur()))
                         .then(() => page.screenshot())
                         .then(screenshot => {
                         new pngjs_1.PNG({

File diff suppressed because it is too large
+ 0 - 0
dist/webshot.js.map


+ 2 - 0
src/webshot.ts

@@ -183,6 +183,8 @@ class Webshot extends CallableInstance<[Tweets, (...args) => void, number], Prom
             })
             .then(() => chainPromises(morePostProcessings.map(func => () => func(page))))
             .then(() => promisify(setTimeout)(getTimeout()))
+            // hide highlight of retweet header
+            .then(() => page.evaluate(() => (document.activeElement as unknown as HTMLOrSVGElement).blur()))
             .then(() => page.screenshot())
             .then(screenshot => {
               new PNG({

Some files were not shown because too many files changed in this diff