PageSourceSearch

https://revolutionidle.cc/_next/static/chunks/949.ad6b3e5b6833a044.js

js revolutionidle.cc collected 2026-10-08 10:31:39 UTC 2,312 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[949],{6949:function(e,a,t){t.r(a),t.d(a,{default:function(){return s}});var l=t(7437),r=t(2265),c=t(9376),n=t(2381),i=t(279),o=t(3675);function s(){let[e,a]=(0,r.useState)({title:"",locale:"",slug:"",excerpt:"",description:"",content:"",coverImage:""}),[t,s]=(0,r.useState)(!0),[h,d]=(0,r.useState)(null),u=(0,c.useSearchParams)().get("path");(0,r.useEffect)(()=>{u?p(u):(d("No article path provided"),s(!1))},[u]);let p=async e=>{s(!0),d(null),console.log(e);try{let t=await fetch("/api/articles?path=".concat(e));if(!t.ok)throw Error("Failed to fetch article");let l=await t.json();a(l)}catch(e){console.error("Error fetching article:",e),d("Failed to fetch article. Please try again.")}finally{s(!1)}},g=t=>{let{name:l,value:r}=t.target;a({...e,[l]:r})},x=async()=>{try{if(!(await fetch("/api/articles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({article:e})})).ok)throw Error("Failed to save article");alert("Article saved successfully")}catch(e){console.error("Error saving article:",e),d("Failed to save article. Please try again.")}};return t?(0,l.jsx)("div",{children:"Loading article..."}):h?(0,l.jsxs)("div",{children:["Error: ",h]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)("h2",{children:"Title"}),(0,l.jsx)(i.I,{name:"title",value:e.title,onChange:g,placeholder:"Article Title"}),(0,l.jsx)("h2",{children:"Description"}),(0,l.jsx)(i.I,{name:"description",value:e.description,onChange:g,placeholder:"Article Description"}),(0,l.jsx)("h2",{children:"Excerpt"}),(0,l.jsx)(i.I,{name:"excerpt",value:e.excerpt,onChange:g,placeholder:"Article Excerpt"}),(0,l.jsx)("h2",{children:"Locale"}),(0,l.jsx)(i.I,{name:"locale",value:e.locale,onChange:g,placeholder:"Article Locale (e.g., en, de, fr)"}),(0,l.jsx)("h2",{children:"Slug"}),(0,l.jsx)(i.I,{name:"slug",value:e.slug,onChange:g,placeholder:"Article Slug (e.g., my-new-article)"}),(0,l.jsx)("h2",{children:"Cover Image"}),(0,l.jsx)(i.I,{name:"coverImage",value:e.coverImage,onChange:g,placeholder:"Article Cover Image URL"}),(0,l.jsx)("h2",{children:"Content"}),(0,l.jsx)(o.g,{name:"content",value:e.content,onChange:g,placeholder:"Article Content (Markdown)",rows:20}),(0,l.jsx)(n.z,{onClick:x,children:"Save Article"})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.