PageSourceSearch

https://occc.net/Portals/_default/Skins/20064-UnlimitedColorsPack-046/scripts/OCscript.js

js occc.net collected 2026-10-03 21:37:28 UTC 2,731 bytes, 87 lines download raw bytes

1/*
2$(function () {
3    $('#searchlink').on('click', function (e) {
4        $(this).toggleClass('open');
5    });
6});
7*/
8
9//Function to the css rule
10function checkSize(){
11    if ($("#cc-header").css("display") == "none" ){
12        // isMobile is TRUE so move the div
13		$('#occc-translate-m').prepend($('#google-translate-bar'));
14    }
15    else
16	{
17		$('#occc-translate').prepend($('#google-translate-bar'));
18	}
19}
20
21
22function changeGoogleStyles() {
23	//return;
24    //if ($("#cc-header").css("display") == "none" )    {
25	    if(($goog = $('.goog-te-menu-frame').contents().find('body')).length) {
26	        var stylesHtml = '<style>'+
27	            '.goog-te-menu2 {'+
28	                'width:100% !important;'+
29	                'overflow-x:auto !important;'+
30	                'box-sizing:border-box !important;'+
31	                'height:auto !important;'+
32	            '}'+
33	            'body {width:100% !important;}'+
34	        '</style>';
35	        $goog.prepend(stylesHtml);
36	    } else {
37	        setTimeout(changeGoogleStyles, 50);
38	    }
39	    //}
40}
41
42$('document').ready(function () {
43	// run test on initial page load
44    checkSize();
45    changeGoogleStyles();
46    
47    // run test on resize of the window
48    $(window).resize(checkSize);
49    $(window).resize(changeGoogleStyles);
50    
51
52    $('#google_translate_element').on("click", function () {
53
54        // Change font family and color
55        $("iframe").contents().find(".goog-te-menu2-item div, .goog-te-menu2-item:link div, .goog-te-menu2-item:visited div, .goog-te-menu2-item:active div, .goog-te-menu2 *")
56            .css({
57                'background': '#333',
58                'color': '#bbbbbb'
59            });
60
61        // Change hover effects
62        $("iframe").contents().find(".goog-te-menu2-item div").hover(function () {
63            $(this).find('span.text').css('color', '#ffa500');
64        }, function () {
65            $(this).find('span.text').css('color', '#bbb');
66            //$(this).css('background', '#fff').find('span.text').css('color', '#ffa500');
67        });
68
69        // Change Google's default blue border
70        $("iframe").contents().find('.goog-te-menu2')
71            .css({
72
73                'padding': '10px !important',
74                'border': '1px solid ffa500'
75            });
76
77        // Change border padding
78        //$("iframe").contents().find(".goog-te-menu2").css('padding','0 !important');
79
80        // Change the iframe's box shadow
81        $(".goog-te-menu-frame").css({
82            '-moz-box-shadow': 'none !important',
83            '-webkit-box-shadow': 'none !important',
84            'box-shadow': 'none !important'
85        });
86    });
87});

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.