PageSourceSearch

https://ccmixter.org/ccskins/shared/js/round-box.js

js ccmixter.org collected 2026-09-24 07:38:59 UTC 1,787 bytes, 46 lines download raw bytes

1
2rbox_counter = 1;
3
4function cc_round_box( e ) {
5    if( window.disable_round_box )
6        return;
7    e = $(e);
8    if( !e )
9        return;
10    var id_o = 'rboxo_' + (rbox_counter++);
11    var id = 'rbox_' + (rbox_counter++);
12    var h2_id = 'h2_rbox_' + rbox_counter;
13    var wid = Element.getWidth(e) - 24;
14
15    var h2 = e.getElementsByTagName('H2');
16    var caption = '';
17    if( h2.length > 0 ) {
18        h2 = h2[0];
19        caption = h2.innerHTML;
20        e.removeChild(h2);
21    }
22//console.log("id_o " + id_o + ".. no wrap in roundbox? index of ccplus-license " + e.innerHTML.indexOf("ccplus-license")) ; 
23	if (  e.innerHTML.indexOf("ccplus-license") > 0 || e.innerHTML.indexOf("Secret Mixter") >0 ) { 
24console.log("id_o " + id_o + ".. no wrap in roundbox? index of ccplus-license " + e.innerHTML.indexOf("ccplus-license")) ; 
25    var html = '<div id="' + id_o + '" style="display:none;width:'+wid+'px;" class=""><div class=""><h2 id="' +
26                h2_id + '" >' + caption + '</h2></div><div id="' + id + '" class="">  </div></div>';
27//	console.log(e) ; 
28}else { 
29    var html = '<div id="' + id_o + '" style="display:none;width:'+wid+'px;" class="cssbox"><div class="cssbox_head"><h2 id="' + 
30                h2_id + '" >' + caption + '</h2></div><div id="' + id + '" class="cssbox_body">  </div></div>';
31} 
32    new Insertion.Before(e,html);
33    var e = Element.remove(e);
34    e.style.width = '';
35    $(id).appendChild(e);
36    $(id_o).style.display = 'block';
37    if( !caption.length )
38        Element.addClassName(h2_id,'no_box_header');
39    Element.removeClassName(e,'box'); // this allows multiple calls to cc_round_box as elements arrive
40}
41
42function cc_round_boxes( className ) {
43    if( window.disable_row_box )
44        return;
45    $$('.box').each( cc_round_box );
46}

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.