User:DannyS712/EFFPRH/sandbox.js: Difference between revisions

Content deleted Content added
tweak styles, add method to actually make the edit (for now just resolves a promise)
fix reload link (not to section), generate edit text
Line 150:
selectedResponse: 'none',
commentValue: '',
// Don't try and link to the specific section, otherwise it just navigates
reloadUrl: mw.util.getUrl( mw.config.get( 'wgPageName' ) + '#' + reporterName ),
// directly instead of reloading
reloadUrl: mw.util.getUrl( mw.config.get( 'wgPageName' ) + '#' + reporterName ),
 
// Overall state
Line 216 ⟶ 218:
EFFPRH.respondToReport = function ( sectionNum, responseOption, extraComment ) {
return new Promise( function ( resolve, reject ) {
console.log(let 'ShouldresponseText respond= '\n: {{EFFP|', sectionNum,+ responseOption, extraComment+ )'}}';
if ( extraComment ) {
responseText += ' ' + extraComment;
}
responseText += ' --~~~~';
console.log( 'Should respond: ', sectionNum, responseText );
resolve();
} );