It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Origin "https://bitcointalk.org"
Header set Access-Control-Allow-Origin "https://bitcointalk.org"
Access to fetch at 'https://loyce.club/trust/latestversion.txt' from origin 'https://bitcointalk.org' has been blocked by
CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Access to fetch at 'https://loyce.club/trust/latestversion.txt' from origin 'https://bitcointalk.org' has been blocked by
CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your
needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
// ==UserScript==
// @name Loyce Trust List Viewer Button
// @version 0.1
// @description adds a button under each user's profile with the latest link to Loyce's Trust Viewer list.
// @author TryNinja
// @match https://bitcointalk.org/index.php?topic=*
// @match https://bitcointalk.org/index.php?action=profile;u=*
// @grant none
// @credits A big part of the code was taken (copy-pasted and modified) from BPIP's extension. https://bitcointalk.org/index.php?topic=5224821.0
// ==/UserScript==
(function() {
const MAX_VALID_USER_ID = 1500000000;
const PROFILE_URL_PREFIX = "https://bitcointalk.org/index.php?action=profile;u=";
const LOYCE_TRUST_LAST_VERSION_URL = "https://loyce.club/trust/latestversion.txt";
let LOYCE_TRUST_URL;
let LOYCE_TRUST_URL_PROFILE;
let LOYCE_TRUST_PROFILE_BUTTON_HTML;
function injectLoyceTrustButtons() {
LOYCE_TRUST_URL_PROFILE = LOYCE_TRUST_URL + "%%USERID%%.html";
LOYCE_TRUST_PROFILE_BUTTON_HTML = '';
if (window.location.href.startsWith(PROFILE_URL_PREFIX)) {
const user_id = window.location.href.replace(PROFILE_URL_PREFIX, "");
const user_name_cell = document.querySelector("tr.titlebg ~ tr td.windowbg table tr").lastElementChild;
LOYCE_TRUST_PROFILE_BUTTON_HTML = LOYCE_TRUST_PROFILE_BUTTON_HTML.replace("%%USERID%%", user_id);
setTimeout(() => {
user_name_cell.innerHTML = user_name_cell.innerHTML + " " + LOYCE_TRUST_PROFILE_BUTTON_HTML;
}, 50)
} else {
document.querySelectorAll("img[title='View Profile']")
.forEach(img => {
let profile_box = img.parentElement.parentElement.parentElement;
let user_name_link = profile_box.querySelector("b > a");
let profile_link = profile_box.querySelector("div.smalltext a[href*='action=profile']");
if (user_name_link && profile_link) {
let user_id = user_name_link.getAttribute("href")
.replace(PROFILE_URL_PREFIX, "");
if (user_id > MAX_VALID_USER_ID) {
return;
}
const loyceTrustProfileFullURL = LOYCE_TRUST_URL_PROFILE.replace("%%USERID%%", user_id);
const loyceTrustButtonElement = document.createElement("a");
loyceTrustButtonElement.setAttribute('href', loyceTrustProfileFullURL);
loyceTrustButtonElement.setAttribute('target', '_blank');
const loyceTrustButtonImageElement = document.createElement("img");
loyceTrustButtonImageElement.setAttribute('src', 'https://i.imgur.com/2Gfqvto.png');
loyceTrustButtonImageElement.setAttribute('style', 'width: 16px; height: 16px;');
loyceTrustButtonImageElement.setAttribute('title', 'Loyce\'s Trust Viewer');
loyceTrustButtonElement.appendChild(loyceTrustButtonImageElement);
profile_link.before(loyceTrustButtonElement);
}
});
}
}
function getLatestLoyceTrustURL() {
let cached = JSON.parse(localStorage.getItem('@btt-ninja-cache/loyce-trust-link'));
if (!cached) {
fetch(LOYCE_TRUST_LAST_VERSION_URL)
.then((response) => response.text())
.then(data => {
LOYCE_TRUST_URL = data;
cached = {
last_url: data,
time: Date.now()
};
localStorage.setItem('@btt-ninja-cache/loyce-trust-link', JSON.stringify(cached));
injectLoyceTrustButtons();
});
} else {
LOYCE_TRUST_URL = cached.last_url;
const oneHourAgo = Date.now() - 1000 * 60 * 60;
if (cached.time < oneHourAgo) {
localStorage.setItem('@btt-ninja-cache/loyce-trust-link', null);
}
injectLoyceTrustButtons();
}
}
getLatestLoyceTrustURL();
})();