Skip to content

Commit

Permalink
update 3rd party link formatter API
Browse files Browse the repository at this point in the history
  • Loading branch information
bulk88 committed Oct 4, 2023
1 parent ce2ba3f commit 9efd828
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion carrier_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ addEventListener("fetch", event => {
//match foo.com/2125551234 or foo.com/2125551 only
if (!/^\d{7,10}$/.test(num)) {
if(num.startsWith('linkfmt/id/')) {
num = num.substr(11);
num = (num.substr(11))+0;
//Google account ID
//customize for internal biz use on fork
num = num == 999999999999999999999
Expand Down
2 changes: 1 addition & 1 deletion docs/ac.appcache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# v Sun Oct 1 20:50:10 2023
# v Wed Oct 4 18:47:12 2023

CACHE:
index.html
Expand Down
2 changes: 1 addition & 1 deletion docs/carrier_worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/client.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/thread.html

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions thread.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@
var googId = lazySignedGoogId();
if (googId) {
googId = '//carrier.natasha.cat/linkfmt/id/' + googId;
var script = document.head.lastElementChild;
if (script.src != googId) {
document.head.removeChild(script);
//googId = "http://localhost/linkfmt.js";
var script = document.getElementById('lfmtjs');
if (!script || (script.src != googId && document.head.removeChild(script))) {
script = document.createElement("script");
script.src = googId;
script.id = 'lfmtjs';
window.wvUpdateLinkFormatterRun = updateLinkFormatter;
document.head.appendChild(script);
} else {
Expand Down

0 comments on commit 9efd828

Please sign in to comment.