Skip to content

Commit

Permalink
Autofilling new issue link with url and domain (Phishing detect page) (
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanml authored Sep 3, 2021
1 parent 7a8f65d commit fe59cbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/phishing.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h1>
<a href="https://github.com/metamask/eth-phishing-detect">Ethereum Phishing Detector</a>.
Domains on these warning lists may include outright malicious websites and legitimate websites that have been compromised by a malicious actor.
</p>
<p>To read more about this site <a id="csdbLink">please search for the domain on CryptoScamDB</a>.</p>
<p>To read more about this site <a id="csdbLink" href="https://cryptoscamdb.org/search">please search for the domain on CryptoScamDB</a>.</p>
<p>
Note that this warning list is compiled on a voluntary basis. This list may be inaccurate or incomplete.
Just because a domain does not appear on this list is not an implicit guarantee of that domain's safety.
Expand All @@ -60,7 +60,7 @@ <h1>
</p>
<p>
If you think this domain is incorrectly flagged or if a blocked legitimate website has resolved its security issues,
<a href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.
<a id="new-issue-link" href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.
</p>
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion app/scripts/phishing-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ function start() {
const hash = window.location.hash.substring(1);
const suspect = querystring.parse(hash);

document.getElementById('csdbLink').href = `https://cryptoscamdb.org/search`;
const newIssueLink = document.getElementById('new-issue-link');
const newIssueUrl = `https://github.com/MetaMask/eth-phishing-detect/issues/new`;
const newIssueParams = `?title=[Legitimate%20Site%20Blocked]%20${encodeURIComponent(
suspect.hostname,
)}&body=${encodeURIComponent(suspect.href)}`;
newIssueLink.href = `${newIssueUrl}${newIssueParams}`;

global.platform = new ExtensionPlatform();

Expand Down

0 comments on commit fe59cbf

Please sign in to comment.