var rehost_size = GM_getValue("hfr_cc_rehost_size", "preview" ); var real_rehost_size = rehost_size === "full" ? "/" : "/" + rehost_size + "/"; function set_rehost_size() { let l_rehost_size = prompt("Taille par défaut des images sous reho.st :\n\n - thumb (230px)\n - preview (600px)\n - medium (800px)\n - full (pleine taille)\n\n", rehost_size); if(l_rehost_size === null) return; l_rehost_size = l_rehost_size.trim(); if(l_rehost_size !== "thumb" && l_rehost_size !== "preview" && l_rehost_size !== "medium" && l_rehost_size !== "full" ) return; GM_setValue("hfr_cc_rehost_size", l_rehost_size); rehost_size = l_rehost_size; real_rehost_size = (rehost_size === "full" ) ? "/" : "/" + rehost_size + "/"; } GM_registerMenuCommand("[HFR] Téléversement d'images -> taille des images sous reho.st (< 2Mo)", set_rehost_size); var imgur_size = GM_getValue("hfr_cc_imgur_size", "large" ); var real_imgur_size = (imgur_size === "small" ) ? "t" : (imgur_size === "full" ) ? "" : imgur_size.substr(0, 1); function set_imgur_size() { let l_imgur_size = prompt("Taille par défaut des images sous imgur :\n\n - small (160px)\n - medium (320px)\n - large (640px)\n - huge (1024px)\n - full (pleine taille)\n\n", imgur_size); if(l_imgur_size === null) return; l_imgur_size = l_imgur_size.trim(); if(l_imgur_size !== "small" && l_imgur_size !== "medium" && l_imgur_size !== "large" && l_imgur_size !== "huge" && l_imgur_size !== "full" ) return; GM_setValue("hfr_cc_imgur_size", l_imgur_size); imgur_size = l_imgur_size; real_imgur_size = (imgur_size === "small" ) ? "t" : (imgur_size === "full" ) ? "" : imgur_size.substr(0, 1); } GM_registerMenuCommand("[HFR] Téléversement d'images -> taille des images sous imgur (> 2Mo)", set_imgur_size); |