|
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8" /> |
5 | 5 | <meta name="viewport" content="width=device-width,initial-scale=1" /> |
6 | | - <title>FEU Grade Calculator — Activation Web App</title> |
7 | | - <meta name="description" content="Official activation web app for FEU Grade Calculator. Activate, configure, and manage your copy securely through Google Apps Script." /> |
| 6 | + <title>FEU Grade Calculator — Launch Activator</title> |
| 7 | + <meta name="description" content="Launch FEU Grade Calculator Activator" /> |
8 | 8 | <link rel="canonical" href="https://feu.jareddo06.ovh/" /> |
9 | 9 | <link rel="icon" href="https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png" type="image/png" /> |
10 | 10 | <style> |
|
29 | 29 | text-align: center; |
30 | 30 | padding: 48px 16px 56px; |
31 | 31 | } |
32 | | - header h1 { |
33 | | - margin: 0; |
34 | | - font-size: 2rem; |
35 | | - letter-spacing: 0.3px; |
36 | | - } |
37 | | - header p { |
38 | | - max-width: 700px; |
39 | | - margin: 10px auto 0; |
40 | | - font-weight: 400; |
41 | | - font-size: 1.05rem; |
42 | | - opacity: 0.9; |
43 | | - } |
44 | | - main { |
45 | | - max-width: var(--maxw); |
46 | | - background: var(--card); |
47 | | - margin: -40px auto 60px; |
48 | | - border-radius: 14px; |
49 | | - box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08); |
50 | | - padding: 36px 30px; |
51 | | - } |
52 | | - h2 { |
53 | | - color: var(--accent); |
54 | | - border-left: 4px solid var(--accent2); |
55 | | - padding-left: 10px; |
56 | | - margin-top: 34px; |
57 | | - margin-bottom: 10px; |
58 | | - font-size: 1.4rem; |
59 | | - } |
60 | | - p, li { |
61 | | - color: #222; |
62 | | - } |
63 | | - a { |
64 | | - color: var(--accent2); |
65 | | - text-decoration: none; |
66 | | - } |
67 | | - a:hover { |
68 | | - text-decoration: underline; |
69 | | - } |
70 | | - .cta { |
71 | | - display: inline-block; |
72 | | - background: var(--accent2); |
73 | | - color: white; |
74 | | - padding: 14px 24px; |
75 | | - font-weight: 600; |
76 | | - border-radius: 8px; |
77 | | - font-size: 1rem; |
78 | | - margin-top: 14px; |
79 | | - transition: background 0.2s ease; |
80 | | - } |
81 | | - .cta:hover { |
82 | | - background: #256427; |
83 | | - } |
84 | | - ul { |
85 | | - margin-left: 1.2rem; |
86 | | - } |
87 | | - hr { |
88 | | - margin: 40px 0; |
89 | | - border: none; |
90 | | - border-top: 1px solid #eee; |
91 | | - } |
92 | | - footer { |
93 | | - text-align: center; |
94 | | - font-size: 13px; |
95 | | - color: var(--muted); |
96 | | - margin-top: 40px; |
97 | | - } |
98 | | - footer a { |
99 | | - color: var(--accent); |
100 | | - } |
| 32 | + header h1 { margin: 0; font-size: 2rem; letter-spacing: 0.3px; } |
| 33 | + header p { max-width: 700px; margin: 10px auto 0; font-weight: 400; font-size: 1.05rem; opacity: 0.9; } |
| 34 | + main { max-width: var(--maxw); background: var(--card); margin: -40px auto 60px; border-radius: 14px; box-shadow: 0 6px 30px rgba(0,0,0,0.08); padding: 36px 30px; } |
| 35 | + .cta { display:inline-block; background:var(--accent2); color:white; padding: 14px 24px; border-radius:8px; font-weight:600; font-size:1rem; border:none; cursor:pointer; text-decoration:none; } |
| 36 | + .cta:hover { background:#256427; } |
| 37 | + label { font-weight:600; display:block; margin-top:12px; } |
| 38 | + input[type="text"] { width:100%; padding:12px; margin-top:8px; border-radius:6px; border:1px solid #ccc; font-size:1rem; } |
| 39 | + p.note { color:var(--muted); margin-top:12px; } |
| 40 | + footer { text-align:center; font-size:13px; color:var(--muted); margin-top:40px; } |
| 41 | + footer a { color:var(--accent); } |
101 | 42 | </style> |
102 | 43 | </head> |
103 | | - |
104 | 44 | <body> |
105 | 45 | <header> |
106 | | - <h1>FEU Grade Calculator — Activation Web App</h1> |
107 | | - <p>Activate and manage your own FEU Grade Calculator Google Sheet securely through Google Apps Script.</p> |
108 | | - <a href="/app" class="cta">🚀 Launch the Web App</a> |
| 46 | + <h1>FEU Grade Calculator</h1> |
| 47 | + <p>Paste your Spreadsheet URL or ID below to open the Activator.</p> |
109 | 48 | </header> |
110 | 49 |
|
111 | 50 | <main> |
112 | | - <section> |
113 | | - <h2>🌐 Live App</h2> |
114 | | - <p> |
115 | | - You can launch the app directly in your browser: |
116 | | - <br> |
117 | | - <strong><a href="/app" target="_blank">https://feu.jareddo06.ovh/app/</a></strong> |
118 | | - </p> |
119 | | - <p class="muted"> |
120 | | - The app runs completely client-side and communicates only with your Google account through a verified Apps Script connection. |
121 | | - </p> |
122 | | - </section> |
123 | | - |
124 | | - <section> |
125 | | - <h2>🧩 Features</h2> |
126 | | - <ul> |
127 | | - <li>Automatically activates the FEU Grade Calculator spreadsheet.</li> |
128 | | - <li>Configures Apps Script triggers and setup scripts.</li> |
129 | | - <li>Protects essential formula cells from accidental edits.</li> |
130 | | - <li>Clean and lightweight HTML + JavaScript interface.</li> |
131 | | - <li>Hosted on GitHub Pages with Google Apps Script integration.</li> |
132 | | - </ul> |
133 | | - </section> |
| 51 | + <label for="sheetInput">Spreadsheet URL or ID</label> |
| 52 | + <input id="sheetInput" type="text" placeholder="Paste full URL or just the ID (e.g. 1OGZKkXOVmqk...)" /> |
| 53 | + <div style="margin-top:14px;"> |
| 54 | + <button id="openActivatorBtn" class="cta">Open Activator</button> |
| 55 | + </div> |
134 | 56 |
|
135 | | - <section> |
136 | | - <h2>⚙️ How It Works</h2> |
137 | | - <ol> |
138 | | - <li>Open the web app — you’ll see a simple activation interface.</li> |
139 | | - <li>Enter your <strong>Spreadsheet ID</strong> (from your Sheet URL).</li> |
140 | | - <li>The app securely connects to the Apps Script backend (<code>Code.gs</code>).</li> |
141 | | - <li>The script performs activation and setup automatically.</li> |
142 | | - <li>When finished, a success message confirms activation.</li> |
143 | | - </ol> |
144 | | - </section> |
145 | | - |
146 | | - <section> |
147 | | - <h2>🔐 Privacy & Security</h2> |
148 | | - <p> |
149 | | - This app only accesses the spreadsheets you authorize. It: |
150 | | - </p> |
151 | | - <ul> |
152 | | - <li>Operates entirely within Google’s secure Apps Script environment.</li> |
153 | | - <li>Does <strong>not</strong> collect or store personal data externally.</li> |
154 | | - <li>Is open-source and auditable for transparency.</li> |
155 | | - </ul> |
156 | | - <p>See the full policy here: |
157 | | - <br>🔗 <a href="/privacy" target="_blank">Privacy Policy</a></p> |
158 | | - </section> |
159 | | - |
160 | | - <section> |
161 | | - <h2>🧠 Tech Stack</h2> |
162 | | - <ul> |
163 | | - <li><strong>Frontend:</strong> HTML, CSS, JavaScript (client-side only)</li> |
164 | | - <li><strong>Backend:</strong> Google Apps Script (<code>Code.gs</code>)</li> |
165 | | - <li><strong>Hosting:</strong> GitHub Pages</li> |
166 | | - <li><strong>APIs:</strong> Google Sheets API via Apps Script</li> |
167 | | - </ul> |
168 | | - </section> |
169 | | - |
170 | | - <section> |
171 | | - <h2>🪜 Setup Guide (Developers)</h2> |
172 | | - <ol> |
173 | | - <li>Fork or clone this repository.</li> |
174 | | - <li>Modify the HTML and JavaScript files as needed.</li> |
175 | | - <li>In Google Apps Script: |
176 | | - <ul> |
177 | | - <li>Paste your backend code (<code>Code.gs</code>).</li> |
178 | | - <li>Deploy as a Web App (execute as <em>me</em>, access by <em>anyone</em>).</li> |
179 | | - </ul> |
180 | | - </li> |
181 | | - <li>Update the script URL in <code>index.html</code>.</li> |
182 | | - <li>Push to GitHub — Pages redeploys automatically.</li> |
183 | | - </ol> |
184 | | - </section> |
| 57 | + <p class="note">If you have the sheet open, copy the long string between <code>/d/</code> and <code>/edit</code> from the URL. The Activator will open and prompt you to authorize if required.</p> |
| 58 | + </main> |
185 | 59 |
|
186 | | - <section> |
187 | | - <h2>🧾 License</h2> |
188 | | - <p> |
189 | | - Licensed under the <strong>MIT License</strong> — you are free to reuse, modify, and distribute with attribution. |
190 | | - </p> |
191 | | - </section> |
| 60 | + <footer> |
| 61 | + <p>© 2025 FEU Grade Calculator — <a href="/privacy">Privacy Policy</a></p> |
| 62 | + </footer> |
192 | 63 |
|
193 | | - <section> |
194 | | - <h2>📬 Contact</h2> |
195 | | - <p> |
196 | | - For inquiries or support, reach out via email: |
197 | | - <br><strong>miguel@jareddo06.ovh</strong> |
198 | | - </p> |
199 | | - </section> |
| 64 | + <script> |
| 65 | + // Extracts spreadsheet ID from a pasted URL or raw ID |
| 66 | + function extractId(input) { |
| 67 | + if (!input) return ""; |
| 68 | + input = input.trim(); |
| 69 | + // If it looks like a full URL with /d/<id>/ |
| 70 | + const match = input.match(/\/d\/([a-zA-Z0-9-_]{20,})/); |
| 71 | + if (match && match[1]) return match[1]; |
| 72 | + // If it looks like just the id |
| 73 | + const idOnly = input.match(/^([a-zA-Z0-9-_]{20,})$/); |
| 74 | + if (idOnly && idOnly[1]) return idOnly[1]; |
| 75 | + return ""; |
| 76 | + } |
200 | 77 |
|
201 | | - <hr> |
| 78 | + document.getElementById("openActivatorBtn").addEventListener("click", () => { |
| 79 | + const v = document.getElementById("sheetInput").value; |
| 80 | + const id = extractId(v); |
| 81 | + if (!id) { |
| 82 | + alert("Please paste a valid spreadsheet URL or ID."); |
| 83 | + return; |
| 84 | + } |
| 85 | + // redirect to /app with id param |
| 86 | + window.location.href = `/app?id=${encodeURIComponent(id)}`; |
| 87 | + }); |
202 | 88 |
|
203 | | - <footer> |
204 | | - <p>© 2025 FEU Grade Calculator Activator • <a href="/privacy" target="_blank">Privacy Policy</a></p> |
205 | | - </footer> |
206 | | - </main> |
| 89 | + // Optional: if the page is opened with ?id= prefill the input (handy for linking from a sheet) |
| 90 | + const urlId = new URLSearchParams(window.location.search).get("id"); |
| 91 | + if (urlId) document.getElementById("sheetInput").value = urlId; |
| 92 | + </script> |
207 | 93 | </body> |
208 | 94 | </html> |
0 commit comments