forked from woem.men/forkey
enhance(data-usage): remove GA timing report on fetch note json (MisskeyIO#849)
This commit is contained in:
parent
36e238197e
commit
5073467f1d
1 changed files with 0 additions and 10 deletions
|
@ -78,7 +78,6 @@ async function prepend(data) {
|
||||||
// チェックするプロパティはなんでも良い
|
// チェックするプロパティはなんでも良い
|
||||||
// idOnlyが有効でid以外が存在しない場合は取得する
|
// idOnlyが有効でid以外が存在しない場合は取得する
|
||||||
if (!data.visibility) {
|
if (!data.visibility) {
|
||||||
const initiateTime = Date.now();
|
|
||||||
const res = await window.fetch(`/notes/${data.id}.json`, {
|
const res = await window.fetch(`/notes/${data.id}.json`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
credentials: 'omit',
|
credentials: 'omit',
|
||||||
|
@ -86,15 +85,6 @@ async function prepend(data) {
|
||||||
'Authorization': 'anonymous',
|
'Authorization': 'anonymous',
|
||||||
'X-Client-Transaction-Id': generateClientTransactionId('misskey'),
|
'X-Client-Transaction-Id': generateClientTransactionId('misskey'),
|
||||||
},
|
},
|
||||||
}).then(res => {
|
|
||||||
if (instance.googleAnalyticsId) {
|
|
||||||
gtagTime({
|
|
||||||
name: 'api-get',
|
|
||||||
event_category: `/notes/${data.id}.json`,
|
|
||||||
value: Date.now() - initiateTime,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
});
|
});
|
||||||
if (!res.ok) return;
|
if (!res.ok) return;
|
||||||
note = await res.json();
|
note = await res.json();
|
||||||
|
|
Loading…
Reference in a new issue