Content deleted Content added
Cramulator (talk | contribs) ←Created page with '(function() { // based on https://en.wikipedia.org/wiki/User:Polygnotus/Scripts/Claude6.js 'use strict'; class WikipediaGeminiProofreader { constructor() { this.apiKey = localStorage.getItem('gemini_api_key'); this.sidebarWidth = localStorage.getItem('gemini_sidebar_width') || '350px'; this.isVisible = localStorage.getItem('gemini_sidebar_visible') !== 'false'; this.currentResults = localStora...' |
Sohom Datta (talk | contribs) m Sohom Datta moved page User:Sohom Datta/GeminiProofreader.js to User:Polygnotus/Scripts/GeminiProofreaderOld.js: mv per tp request |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1:
// instructions: add the following to your User/common.js file
(function() {
'use strict';
class WikipediaGeminiProofreader {
Line 8 ⟶ 10:
this.currentResults = localStorage.getItem('gemini_current_results') || '';
this.buttons = {};
this.modelName = 'gemini-2.5-
this.init();
}
Line 446 ⟶ 448:
title: 'Set Gemini API Key', // Changed
message: $('<div>').append(
$('<p>').
textInput.$element
),
Line 591 ⟶ 593:
if (!wikicode) {
throw new Error('Could not fetch article wikicode');
}
Line 611 ⟶ 600:
this.updateStatus('Proofreading complete!');
const finalOutput = `${articleTitle}:\n${result}`; // Prepend title to proofreading
this.updateOutput(finalOutput, true);
} catch (error) {
Line 700 ⟶ 690:
contents: [{
parts: [{ "text": wikicode }],
// role: "user"
}],
systemInstruction: {
Line 706 ⟶ 696:
},
generationConfig: {
maxOutputTokens:
temperature: 0.
{urlContext: {}},
{googleSearch: {}},
],
};
|