소스 검색

hide newly introduced highlight of retweet header

Mike L 3 년 전
부모
커밋
763f47d015
3개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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({

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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({

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.