User:Joshua Scott/Scripts/pendingchanges.js: Difference between revisions

Content deleted Content added
Move beta to prod. Uses JSON, some other fixes to make it work again.
<maintenance> more info TypeError: Cannot read properties of null (reading 'parentNode')
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(3 intermediate revisions by 3 users not shown)
Line 185:
var div = document.createElement('div');
div.setAttribute('id', 'p-pendingchanges');
div.className = 'portletportal';
var heading = document.createElement('h5h3');
heading.appendChild(document.createTextNode(pendch_str_box_title));
div.appendChild(heading);
Line 208:
} else {
var node = document.getElementById('p-search');
if ( node && node.parentNode === side_col ) {
side_col.insertBefore(div, node);
}
}
}
Line 245 ⟶ 247:
var div = document.createElement('div');
div.setAttribute('id', 'p-pendingchanges');
div.className = 'portletportal';
var heading = document.createElement('h5h3');
heading.appendChild(document.createTextNode(pendch_str_box_title));
div.appendChild(heading);
Line 283 ⟶ 285:
div.setAttribute('id', 'p-pendingchanges');
div.className = 'portal collapsed';
var heading = document.createElement('h5h3');
heading.appendChild(document.createTextNode(pendch_str_box_title));
div.appendChild(heading);
Line 309 ⟶ 311:
 
if( typeof $ != 'undefined' ) {
$('#p-pendingchanges > h5h3').keydown( function( event ) {
if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) {
pendch_toggle( $(this) );
Line 360 ⟶ 362:
div.setAttribute('id', 'p-pendingchanges');
div.className = 'portal expanded';
var heading = document.createElement('h5h3');
heading.appendChild(document.createTextNode(pendch_str_box_title));
div.appendChild(heading);
Line 387 ⟶ 389:
 
if( typeof $ != 'undefined' ) {
$('#p-pendingchanges > h5h3').keydown( function( event ) {
if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) {
pendch_toggle( $(this) );
Line 403 ⟶ 405:
 
function pendch_toggle( $element ) {
$j.cookie( 'vector-nav-' + $element.parent().attr( 'id' ), $element.parent().is( '.collapsed' ) );
if( $element.parent().is('.collapsed') ) {
pendch_enable_box();