Closed justagirl33 closed 4 hours ago
26342 26343 26344 26345 26346 26347 26348 26349 26350 26351 26352 26353 26354 26355 26356 26357 26358 26359 26360 26361 26362 26363 26364 26365 26366 26367 26368 26369 26370 26371 26372 26373 26374 26375 26376 26377 26378 26379 26380 26381 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 26392 26393 26394 26395 26396 26397 26398 26399 26400 26401 26402 26403 26404 26405 26406 26407 26408 26409 26410 26411 26412 26413 26414 26415 26416 26417 26418 26419 26420 26421 26422 26423 26424 26425 26426 26427 26428 26429 26430 26431 26432 26433 26434
<25435 lines not shown> static createImageBackground(imageUrl) { return `background-image: url('${imageUrl}'); background-size: 100% auto;`; } static createShadowEffects(shadows) { if (!shadows?.length) return "filter: '';"; const dropShadows = shadows.map((shadow) => { const color = _SevenTVPaintStyleGenerator.convertColorToHex(shadow.color); return `drop-shadow(${color} ${shadow.x_offset}px ${shadow.y_offset}px ${shadow.radius}px)`; }); return `filter: ${dropShadows.join(" ")};`; } static generateCSSRules(paint, shadows) { const rules = []; switch (paint.function) { case "LINEAR_GRADIENT": rules.push(_SevenTVPaintStyleGenerator.createLinearGradient(paint)); break; case "RADIAL_GRADIENT": rules.push(_SevenTVPaintStyleGenerator.createRadialGradient(paint)); break; case "URL": rules.push(_SevenTVPaintStyleGenerator.createImageBackground(paint.image_url)); break; } if (shadows) rules.push(_SevenTVPaintStyleGenerator.createShadowEffects(paint.shadows ?? [])); return rules.filter(Boolean).join(""); } }; // dist/chrome/src/Extensions/SevenTV/index.ts var logger34 = new Logger(); var { log: log32, info: info31, error: error34 } = logger34.destruct(); var SevenTV; ((SevenTV2) => { let EmoteLifecycle; ((EmoteLifecycle2) => { EmoteLifecycle2[EmoteLifecycle2["DELETED"] = 0] = "DELETED"; EmoteLifecycle2[EmoteLifecycle2["PENDING"] = 1] = "PENDING"; EmoteLifecycle2[EmoteLifecycle2["PROCESSING"] = 2] = "PROCESSING"; EmoteLifecycle2[EmoteLifecycle2["DISABLED"] = 3] = "DISABLED"; EmoteLifecycle2[EmoteLifecycle2["LIVE"] = 4] = "LIVE"; EmoteLifecycle2[EmoteLifecycle2["FAILED"] = 5] = "FAILED"; })(EmoteLifecycle = SevenTV2.EmoteLifecycle || (SevenTV2.EmoteLifecycle = {})); let EmoteFlags; ((EmoteFlags2) => { EmoteFlags2[EmoteFlags2["PRIVATE"] = 1] = "PRIVATE"; EmoteFlags2[EmoteFlags2["AUTHENTIC"] = 2] = "AUTHENTIC"; EmoteFlags2[EmoteFlags2["ZERO_WIDTH"] = 256] = "ZERO_WIDTH"; })(EmoteFlags = SevenTV2.EmoteFlags || (SevenTV2.EmoteFlags = {})); let EmoteSetFlags; ((EmoteSetFlags2) => { })(EmoteSetFlags = SevenTV2.EmoteSetFlags || (SevenTV2.EmoteSetFlags = {})); let ObjectKind; ((ObjectKind2) => { ObjectKind2[ObjectKind2["USER"] = 1] = "USER"; ObjectKind2[ObjectKind2["EMOTE"] = 2] = "EMOTE"; ObjectKind2[ObjectKind2["EMOTE_SET"] = 3] = "EMOTE_SET"; ObjectKind2[ObjectKind2["ROLE"] = 4] = "ROLE"; ObjectKind2[ObjectKind2["ENTITLEMENT"] = 5] = "ENTITLEMENT"; ObjectKind2[ObjectKind2["BAN"] = 6] = "BAN"; ObjectKind2[ObjectKind2["MESSAGE"] = 7] = "MESSAGE"; ObjectKind2[ObjectKind2["REPORT"] = 8] = "REPORT"; ObjectKind2[ObjectKind2["PRESENCE"] = 9] = "PRESENCE"; ObjectKind2[ObjectKind2["COSMETIC"] = 10] = "COSMETIC"; })(ObjectKind = SevenTV2.ObjectKind || (SevenTV2.ObjectKind = {})); })(SevenTV || (SevenTV = {})); function getStvPlatformId() { switch (PLATFORM) { case "twitch" /* TWITCH */: return "TWITCH"; case "kick" /* KICK */: return "KICK"; case "youtube" /* YOUTUBE */: return "YOUTUBE"; } error34("EXT:STV", "MAIN", "Unsupported platform:", PLATFORM); return "UNKNOWN"; } var SevenTVExtension = class extends Extension { name = "7TV"; version = "1.0.0"; description = "7TV extension for emote support"; database; datastore; sessionCreateCb; sessionDestroyCb; renderMessageMiddleware; paintSheet = null; eventAPI = null; cachedStvMeUser = null; // private cachedStvChannelUser: PickThe 7TV extension has been found to be enabled on ${platformName}. 7TV is not compatible with NipahTV and will cause issues if both are enabled at the same time. It is possible to keep the 7TV extension for other streaming websites if you want, by disabling the extension for only ${platformName}.
If you want to keep 7TV for other streaming websites instead of uninstalling it completely, please follow the instructions on https://nipahtv.com/seventv_compatibility.
Feel free to join the NipahTV Discord community if you need help with this.
You can ignore this warning if you want, but expect weird issues such as blank and empty messages.
` }); announcementService.displayAnnouncement("seventv_conflict"); }).catch(() => { }); } async createChannelSession() { log35("CORE", "MAIN", `Creating new session for ${window.location.href}...`); const rootContext = this.rootContext; if (!rootContext) throw new Error("Root context is not initialized."); const { settingsManager, eventBus: rootEventBus } = rootContext; const eventBus = new Publisher("SESSION"); const usersManager = new UsersManager({ eventBus, settingsManager }); const session = { eventBus, usersManager, inputCompletionStrategyRegister: new InputCompletionStrategyRegister(), inputExecutionStrategyRegister: new InputExecutionStrategyRegister() }; if (PLATFORM === "kick" /* KICK */) { session.networkInterface = new KickNetworkInterface(session); } else if (PLATFORM === "twitch" /* TWITCH */) { throw new Error("Twitch platform is not supported yet."); } else { throw new Error("Unsupported platform"); } const networkInterface = session.networkInterface; const promiseRes = await Promise.allSettled([ this.loadSettingsManagerPromise, networkInterface.loadMeData().catch((err) => { throw `Couldn't load me data because: ${err.message}`; }), networkInterface.loadChannelData().catch((err) => { throw `Couldn't load channel data because: ${err.message}`; }) ]); for (const res of promiseRes) { if (res.status === "rejected") return error37("CORE", "MAIN", "Failed to create session because:", res.reason); } if (!session.meData) throw new Error("Failed to load me user data."); if (!session.channelData) throw new Error("Failed to load channel data."); this.sessions.push(session); const channelData = session.channelData; eventBus.publish("ntv.channel.loaded.channel_data", channelData); const disableModCreatorView = settingsManager.getSetting( channelData.channelId, "moderators.mod_creator_view.disable_ntv" ); if (disableModCreatorView && (channelData.isModView || channelData.isCreatorView)) { info34("CORE", "MAIN", "NipahTV is disabled for this channel in mod/creator view."); return; } this.attachEventServiceListeners(rootContext, session); session.badgeProvider = new KickBadgeProvider(rootContext, channelData); session.badgeProvider.initialize(); const emotesManager = this.emotesManager = new EmotesManager(rootContext, session); emotesManager.initialize(); session.emotesManager = emotesManager; session.inputExecutionStrategyRegister.registerStrategy(new DefaultExecutionStrategy(rootContext, session)); session.inputExecutionStrategyRegister.registerStrategy(new CommandExecutionStrategy(rootContext, session)); let userInterface; if (PLATFORM === "kick" /* KICK */) { userInterface = new KickUserInterface(rootContext, session); } else { return error37("CORE", "MAIN", "Platform has no user interface implemented..", PLATFORM); } session.userInterface = userInterface; if (PLATFORM === "kick" /* KICK */) { emotesManager.registerProvider(KickEmoteProvider); } else if (PLATFORM === "twitch" /* TWITCH */) { throw new Error("Twitch platform is not supported yet."); } else { throw new Error("Unsupported platform"); } rootEventBus.publish("ntv.session.create", session); if (!this.stylesLoaded) { this.loadStyles().then(() => { this.stylesLoaded = true; userInterface.loadInterface(); }).catch((response) => error37("CORE", "INIT", "Failed to load styles.", response)); } else { userInterface.loadInterface(); } const providerOverrideOrder = [2 /* SEVENTV */, 1 /* KICK */]; emotesManager.loadProviderEmotes(channelData, providerOverrideOrder); } loadReloadUIHack() { const rootContext = this.rootContext; if (!rootContext) throw new Error("Root context is not initialized."); rootContext.eventBus.subscribe("ntv.reload_sessions", () => { this.sessions.forEach((session) => { session.isDestroyed = true; session.eventBus.publish("ntv.session.destroy"); session.eventBus.publish("ntv.session.restore_original"); this.rootContext?.eventBus.publish("ntv.session.destroy", session); }); this.sessions = []; setTimeout(() => this.createChannelSession(), 1e3); }); } attachEventServiceListeners(rootContext, session) { const { eventBus, channelData, meData } = session; if (channelData.isVod) return; rootContext.eventService.subToChatroomEvents(channelData); rootContext.eventService.addEventListener(channelData, "MESSAGE", (message) => { eventBus.publish("ntv.chat.message.new", message, true); }); rootContext.eventService.addEventListener(channelData, "CHATROOM_UPDATED", (chatroomData) => { const oldChatroomData = channelData.chatroom; if (oldChatroomData?.emotesMode?.enabled !== chatroomData.emotesMode?.enabled) { eventBus.publish("ntv.channel.chatroom.emotes_mode.updated", chatroomData.emotesMode); } else if (oldChatroomData?.subscribersMode?.enabled !== chatroomData.subscribersMode?.enabled) { eventBus.publish("ntv.channel.chatroom.subscribers_mode.updated", chatroomData.subscribersMode); } else if (oldChatroomData?.followersMode?.enabled !== chatroomData.followersMode?.enabled || oldChatroomData?.followersMode?.min_duration !== chatroomData.followersMode?.min_duration) { eventBus.publish("ntv.channel.chatroom.followers_mode.updated", chatroomData.followersMode); } else if (oldChatroomData?.slowMode?.enabled !== chatroomData.slowMode?.enabled || oldChatroomData?.slowMode?.messageInterval !== chatroomData.slowMode?.messageInterval) { eventBus.publish("ntv.channel.chatroom.slow_mode.updated", chatroomData.slowMode); } channelData.chatroom = chatroomData; eventBus.publish("ntv.channel.chatroom.updated", chatroomData); }); let unbanTimeoutHandle = null; rootContext.eventService.addEventListener(channelData, "USER_BANNED", (data) => { eventBus.publish("ntv.channel.chatroom.user.banned", data); if (data.user.id === meData.userId) { log35("CORE", "MAIN", "You have been banned from the channel.."); session.channelData.me.isBanned = { bannedAt: (/* @__PURE__ */ new Date()).toISOString(), expiresAt: data.expiresAt, permanent: data.permanent, reason: "" // Reason is not provided by Kick here }; eventBus.publish("ntv.channel.chatroom.me.banned", data); if (unbanTimeoutHandle) clearTimeout(unbanTimeoutHandle); if (!data.permanent) { unbanTimeoutHandle = setTimeout(() => { delete session.channelData.me.isBanned; eventBus.publish("ntv.channel.chatroom.me.unbanned"); }, data.duration * 60 * 1e3); } } }); rootContext.eventService.addEventListener(channelData, "USER_UNBANNED", (data) => { eventBus.publish("ntv.channel.chatroom.user.unbanned", data); if (data.user.id === meData.userId) { if (unbanTimeoutHandle) clearTimeout(unbanTimeoutHandle); log35("CORE", "MAIN", "You have been unbanned from the channel.."); delete session.channelData.me.isBanned; eventBus.publish("ntv.channel.chatroom.me.unbanned"); } }); } loadStyles() { if (true) return Promise.resolve(); return new Promise((resolve, reject) => { info34("CORE", "INIT", "Injecting styles.."); if (false) { GM_xmlhttpRequest({ method: "GET", url: RESOURCE_ROOT + "dist/userscript/kick.css", onerror: () => reject("Failed to load local stylesheet"), onload: function(response) { log35("CORE", "MAIN", "Loaded styles from local resource.."); GM_addStyle(response.responseText); resolve(void 0); } }); } else { let style; switch (PLATFORM) { case "kick" /* KICK */: style = "KICK_CSS"; break; default: return reject("Unsupported platform"); } const stylesheet = GM_getResourceText(style); if (!stylesheet) return reject("Failed to load stylesheet"); if (stylesheet.substring(0, 4) === "http") { reject("Invalid stylesheet resource."); } GM_addStyle(stylesheet); resolve(void 0); } }); } attachPageNavigationListener() { info34("CORE", "MAIN", "Current URL:", window.location.href); let locationURL = window.location.href; let channelName = null; const navigateFn = () => { if (locationURL === window.location.href) return; if (window.location.pathname.match("^/[a-zA-Z0-9]{8}(?:-[a-zA-Z0-9]{4,12}){4}/.+")) return; const prevLocation = locationURL; const newLocation = window.location.href; locationURL = newLocation; log35("CORE", "MAIN", "Navigated to:", newLocation); const prevSession = this.sessions[0]; const prevChannelName = prevSession.channelData.channelName;26342 const prevChannelName = prevSession.channelData.channelName; error message
Ah, thats no good. Thanks for reporting! I'll fix it asap.
The issue should be fixed now. Could you kindly perform a manual update and tell me if this fixed it for you? The update should be available in about at most a hour from the moment I posted this.
If you're not sure how to manually update, in Chrome go to extensions and in top of screen click on "Developer mode". New buttons will appear, one of which is "Update".
and
(I've got dark theme, might be white for you)
thank you so much
On Sun, Nov 3, 2024 at 1:35 PM Xzensi @.***> wrote:
Ah, thats no good. Thanks for reporting! I'll fix it asap.
— Reply to this email directly, view it on GitHub https://github.com/Xzensi/NipahTV/issues/192#issuecomment-2453525408, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMQVOV7ZHCTSHSM5IWGQ2BLZ6ZUFFAVCNFSM6AAAAABRCXFGGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGUZDKNBQHA . You are receiving this because you authored the thread.Message ID: @.***>
Assuming it's fixed now I'll close this issue. Let me know if it's still giving you problems and I'll reopen it.
oh ok yes i do not know how but now you told me i will yes it is working, thank you very much 🙂
On Mon, Nov 4, 2024 at 1:11 PM Xzensi @.***> wrote:
Closed #192 https://github.com/Xzensi/NipahTV/issues/192 as completed.
— Reply to this email directly, view it on GitHub https://github.com/Xzensi/NipahTV/issues/192#event-15108394444, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMQVOV3RIM6CBUMOILRGFSLZ662EFAVCNFSM6AAAAABRCXFGGGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGEYDQMZZGQ2DINA . You are receiving this because you authored the thread.Message ID: @.***>
i opened kick today no nipah badge and no nipah, i removed it several times from chrome and reinstalled it tried a few things i have no idea where it is, can someone help please?