Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,19 @@ function fetchWithJsonp(url) {
resolve(data);
};

// リファラー情報を追加
// リファラー情報を追加(複数の方法で試行)
const currentUrl = window.location.href;
const separator = url.indexOf('?') >= 0 ? '&' : '?';
const urlWithReferrer = url + separator + 'callback=' + callbackName + '&referrer=' + encodeURIComponent(currentUrl);
const urlWithReferrer = url + separator + 'callback=' + callbackName +
'&referrer=' + encodeURIComponent(currentUrl) +
'&ref=' + encodeURIComponent(currentUrl) +
'&source=' + encodeURIComponent(currentUrl);

console.log('=== JSONP リクエスト詳細 ===');
console.log('元のURL:', url);
console.log('現在のページURL:', currentUrl);
console.log('エンコード済みリファラー:', encodeURIComponent(currentUrl));
console.log('最終リクエストURL:', urlWithReferrer);

// スクリプトタグを作成してJSONPリクエスト
const script = document.createElement('script');
Expand Down