Segui il video qui sotto per vedere come installare il nostro sito come web app sulla tua schermata principale.
Nota: Questa funzionalità potrebbe non essere disponibile in alcuni browser.
"data": {
"xdt_api__v1__media__shortcode__web_info": {
"items": [
{
"carousel_media": [
)
"original_height": 4096,
"original_width": 3072,
// Change line 13847 to this
const url = `${location.origin}/api/v1/media/${shortcodeToMediaId(shortcode)}/info/`;
// Change line 13873 to this
const mediaInfo = data;
// Paste this function definition above or below the definition of fetchPostInfoGraphQL
function shortcodeToMediaId(shortcode) {
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
const BASE = 1e7;
const limbs = [0];
for (const ch of shortcode.slice(0, 11)) {
const value = alphabet.indexOf(ch);
if (value < 0) throw new Error('Invalid shortcode character: ' + ch);
let carry = value;
for (let i = 0; i < limbs.length; i++) {
const x = limbs[i] * 64 + carry;
limbs[i] = x % BASE;
carry = Math.floor(x / BASE);
}
while (carry > 0) {
limbs.push(carry % BASE);
carry = Math.floor(carry / BASE);
}
}
let result = String(limbs[limbs.length - 1]);
for (let i = limbs.length - 2; i >= 0; i--) {
result += String(limbs[i]).padStart(7, '0');
}
return result;
}
// finally, if this code sucks, blame claude