Tag: release

Entertainment
Actress Ganga Mamgai’s film Vash- Possessed by the Obsessed is set to release on 21st July

Actress Ganga Mamgai’s film Vash- Possessed by the Obsessed...

 Hindi Movie “Vash- Possessed by the Obsessed” trailer out. all set to release on...

Entertainment
UnWoman is all set to release in theatre on 5th May, 2023

UnWoman is all set to release in theatre on 5th May, 2023

 Mumbai (Maharashtra) [India], March 24: "UnWoman," the award winning upcoming social...

Entertainment
Deepak Mukut to release Kangana Ranaut’s Dhaakad pan-India in Hindi, Tamil, Telugu and Malayalam on May 27, 2022

Deepak Mukut to release Kangana Ranaut’s Dhaakad pan-India...

  The Indian theatre business seems to be coming back to its groove lately and to...

Entertainment
Director Sunill Khosla’s Punjabi Film 'MERA VYAH KARA DO' Is Ready for Release

Director Sunill Khosla’s Punjabi Film 'MERA VYAH KARA DO'...

 A Raju Chadha Presentation and Maxor Movies’ Production “Mera Vyah Kara Do” Punjabi...

Entertainment
Well known actor Sunil Kumar all set to make entry in Bollywood with his first Music Video release by Zee Music

Well known actor Sunil Kumar all set to make entry in Bollywood...

 Mumbai (Maharashtra) [India] : Actor Sunil Kumar vastly known for his regional...

// JavaScript Code for SCNWire News Widget with API and RSS Feed Fallback (function () { // Configuration const widgetContainerId = "scnwire-news-widget"; // ID of the container where the news will be displayed const apiUrl = "https://www.scnwire.com/api/news"; // Replace with the actual API endpoint const rssFeedUrl = "https://www.scnwire.com/rss.xml"; // RSS Feed URL const newsLimit = 5; // Number of news items to display const widgetStyles = ` #${widgetContainerId} { font-family: Arial, sans-serif; max-width: 400px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); background-color: #ffffff; } #${widgetContainerId} h2 { font-size: 1.5rem; margin-bottom: 16px; color: #333333; } #${widgetContainerId} .news-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #e0e0e0; } #${widgetContainerId} .news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } #${widgetContainerId} .news-item h3 { font-size: 1.1rem; margin: 0 0 8px 0; color: #007BFF; } #${widgetContainerId} .news-item p { font-size: 0.9rem; margin: 0; color: #666666; } #${widgetContainerId} .news-item a { color: inherit; text-decoration: none; } #${widgetContainerId} .news-item a:hover { text-decoration: underline; } `; // Inject styles into the document const styleSheet = document.createElement("style"); styleSheet.type = "text/css"; styleSheet.innerText = widgetStyles; document.head.appendChild(styleSheet); // Create the widget container const widgetContainer = document.createElement("div"); widgetContainer.id = widgetContainerId; widgetContainer.innerHTML = `

Latest News from SCNWire

`; document.body.appendChild(widgetContainer); // Fetch news data from API async function fetchNewsFromAPI() { try { const response = await fetch(apiUrl); if (!response.ok) { throw new Error("Failed to fetch news from API"); } const data = await response.json(); return data.slice(0, newsLimit); // Limit the number of news items } catch (error) { console.error("Error fetching news from API:", error); return null; // Return null if API fails } } // Fetch and parse RSS feed async function fetchNewsFromRSS() { try { const response = await fetch(rssFeedUrl); if (!response.ok) { throw new Error("Failed to fetch RSS feed"); } const text = await response.text(); const parser = new DOMParser(); const xmlDoc = parser.parseFromString(text, "text/xml"); const items = xmlDoc.querySelectorAll("item"); return Array.from(items).slice(0, newsLimit).map((item) => ({ title: item.querySelector("title").textContent, description: item.querySelector("description").textContent, link: item.querySelector("link").textContent, })); } catch (error) { console.error("Error fetching RSS feed:", error); return null; // Return null if RSS feed fails } } // Display news in the widget function displayNews(newsItems) { if (!newsItems || newsItems.length === 0) { widgetContainer.innerHTML += `

No news available at the moment.

`; return; } newsItems.forEach((item) => { const newsItem = document.createElement("div"); newsItem.className = "news-item"; newsItem.innerHTML = `

${item.title}

${item.description}

`; widgetContainer.appendChild(newsItem); }); } // Initialize the widget async function initializeWidget() { let newsItems = await fetchNewsFromAPI(); // Try fetching from API first if (!newsItems) { newsItems = await fetchNewsFromRSS(); // Fallback to RSS feed if API fails } displayNews(newsItems); } initializeWidget(); })();