1. JavaScript / Говнокод #18675

    +2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    function shop_name(id){
    	console.log(id);
    	if(id==95){$(".point").text("Jeanne D'Ark");}else if(id==18){$(".point").text("ADL-Adilisik");return "ADL-Adilisik"}else if(id==92){$(".point").text("Befree");return "Befree"}else if(id==3){$(".point").text("Belladonna");return "Belladonna"}else if(id==16){$(".point").text("Bershka");return "Bershka"}else if(id==31){$(".point").text("Calliope");return "Calliope"}else if(id==37){$(".point").text("Calvin Klein");return "Calvin Klein"}else if(id==111){$(".point").text("Caterina Leman");return "Caterina Leman"}else if(id==32){$(".point").text("Colin's");return "Colin's"}else if(id==71){$(".point").text("Concept Club");return "Concept Club"}else if(id==14){$(".point").text("CONVERSE");return "CONVERSE"}else if(id==9){$(".point").text("Cop.copine");return "Cop.copine"}else if(id==34){$(".point").text("GAP ");return "GAP "}else if(id==125){$(".point").text("Glenfield");return "Glenfield"}else if(id==120){$(".point").text("SuperStep");return "SuperStep"}else if(id==75){$(".point").text("Incity");return "Incity"}else if(id==20){$(".point").text("TOPSHOP (СКОРО ОТКРЫТИЕ)");return "TOPSHOP (СКОРО ОТКРЫТИЕ)"}else if(id==96){$(".point").text("NELVA (СКОРО ОТКРЫТИЕ)");return "NELVA (СКОРО ОТКРЫТИЕ)"}else if(id==123){$(".point").text("Karen Millen");return "Karen Millen"}else if(id==77){$(".point").text("Pull and Bear ");return "Pull and Bear "}else if(id==121){$(".point").text("Lacoste");return "Lacoste"}else if(id==35){$(".point").text("Lady&gentleman CITY");return "Lady&gentleman CITY"}else if(id==110){$(".point").text("Lauren Vidal");return "Lauren Vidal"}else if(id==45){$(".point").text("Studio 77");return "Studio 77"}else if(id==19){$(".point").text("LOVE REPUBLIC");return "LOVE REPUBLIC"}else if(id==70){$(".point").text("Best Watch");return "Best Watch"}else if(id==113){$(".point").text("Mango");return "Mango"}else if(id==21){$(".point").text("MEXX");return "MEXX"}else if(id==15){$(".point").text("QUIKSILVER / ROXY ");return "QUIKSILVER / ROXY "}else if(id==7374){$(".point").text("UNIQLO ");return "UNIQLO "}else if(id==130){$(".point").text("Oasis");return "Oasis"}else if(id==69){$(".point").text("Oodji");return "Oodji"}else if(id==115){$(".point").text("Promod");return "Promod"}else if(id==76){$(".point").text("Pull and Bear");return "Pull and Bear"}else if(id==30){$(".point").text("BEBE");return "BEBE"}else if(id==108){$(".point").text("Ярмарка российских дизайнеров FASHION PROFESSION");return "Ярмарка российских дизайнеров FASHION PROFESSION"}else if(id==72){$(".point").text("Stradivarius");return "Stradivarius"}else if(id==17){$(".point").text("Terranova");return "Terranova"}else if(id==13){$(".point").text("TOM TAILOR");return "TOM TAILOR"}else if(id==116){$(".point").text("LUSIO");return "LUSIO"}else if(id==36){$(".point").text("VANS");return "VANS"}else if(id==8){$(".point").text("Victoria's Secret Beauty & Accessories");return "Victoria's Secret Beauty & Accessories"}else if(id==29){$(".point").text("Zara");return "Zara"}else if(id==91){$(".point").text("Твое");return "Твое"}else if(id==7){$(".point").text("Calipso");return "Calipso"}else if(id==126){$(".point").text("Carlo Pazolini");return "Carlo Pazolini"}else if(id==89){$(".point").text("Lady Collection");return "Lady Collection"}else if(id==88){$(".point").text("Marmalato");return "Marmalato"}else if(id==139){$(".point").text("Stroili Oro");return "Stroili Oro"}else if(id==87){$(".point").text("Parfois");return "Parfois"}else if(id==53){$(".point").text("Вуаля");return "Вуаля"}else if(id==57){$(".point").text("Mywalit");return "Mywalit"}else if(id==145){$(".point").text("МТС");return "МТС"}else if(id==127){$(".point").text("Calzedonia");return "Calzedonia"}else if(id==114){$(".point").text("Etam");return "Etam"}else if(id==148){$(".point").text("Intimissimi");return "Intimissimi"}else if(id==972){$(".point").text("Hearts of Russia");return "Hearts of Russia"}else if(id==128){$(".point").text("Дефиле");return "Дефиле"}else if(id==11){$(".point").text("Rockport");return "Rockport"}else if(id==38){$(".point").text("Эстель Адони");return "Эстель Адони"}else if(id==106){$(".point").text("Blanche et Brillante");return "Blanche et Brillante"}else if(id==137){$(".point").text("SEA OF SPA");return "SEA OF SPA"}else if(id==23){$(".point").text("M.A.C.");return "M.A.C."}else if(id==109){$(".point").text("Organic Shop");return "Organic Shop"}else if(id==22){$(".point").text("The body shop");return "The body shop"}else if(id==12){$(".point").text("Yves Rocher ");return "Yves Rocher "}else if(id==118){$(".point").text("РИВ ГОШ");return "РИВ ГОШ"}else if(id==56){$(".point").text("PANDORA");return "PANDORA"}else if(id==140){$(".point").text("Созвездие красоты");return "Созвездие красоты"}else if(id==129){$(".point").text("L'OCCITANE ");return "L'OCCITANE "}else if(id==10){$(".point").text("Swarovski");return "Swarovski"}else if(id==144){$(".point").text("Swatch");return "Swatch"}else if(id==47){$(".point").text("TONY PEROTTI");return "TONY PEROTTI"}else if(id==143){$(".point").text("НОУ-ХАУ / ИОН");return "НОУ-ХАУ / ИОН"}else if(id==85){$(".point").text("Красный куб");return "Красный куб"}else if(id==175){$(".point").text("SUNLIGHT Brilliant");return "SUNLIGHT Brilliant"}else if(id==60){$(".point").text("KFC");return "KFC"}else{
    			$('.point').text('');
    		}
    	}

    Даже проверок на существование id нет...

    hex2bomb, 04 Сентября 2015

    Комментарии (3)
  2. PHP / Говнокод #18674

    +5

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    <?php
    $i = 0;
    foreach($Person as $val){
        $i++;
    }
    return $i;//ВЫВОД <D>

    m0003r, 04 Сентября 2015

    Комментарии (2)
  3. JavaScript / Говнокод #18673

    +7

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    for (var s5_responsive_mobile_sidebar_menu_auto_open_y = 0; s5_responsive_mobile_sidebar_menu_auto_open_y < s5_responsive_mobile_sidebar_menu_auto_open.length; s5_responsive_mobile_sidebar_menu_auto_open_y++) {
                    if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].className == "s5_mobile_sidebar_active") {
                        if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode) {
                            if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.className == "s5_responsive_mobile_sidebar_sub") {
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.style.display = "block";
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.previousSibling.className = "s5_mobile_sidebar_h3_open";
                            }
                        } else if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode) {
                            if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.className == "s5_responsive_mobile_sidebar_sub") {
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.style.display = "block";
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.previousSibling.className = "s5_mobile_sidebar_h3_open";
                            }
                        } else if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode) {
                            if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.className == "s5_responsive_mobile_sidebar_sub") {
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.style.display = "block";
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling.className = "s5_mobile_sidebar_h3_open";
                            }
                        } else if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode) {
                            if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className == "s5_responsive_mobile_sidebar_sub") {
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display = "block";
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling.className = "s5_mobile_sidebar_h3_open";
                            }
                        } else if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode) {
                            if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className == "s5_responsive_mobile_sidebar_sub") {
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display = "block";
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling.className = "s5_mobile_sidebar_h3_open";
                            }
                        } else if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode) {
                            if (s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className == "s5_responsive_mobile_sidebar_sub") {
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display = "block";
                                s5_responsive_mobile_sidebar_menu_auto_open[s5_responsive_mobile_sidebar_menu_auto_open_y].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling.className = "s5_mobile_sidebar_h3_open";
                            }
                    }
                }

    Понятия не имею что эта хрень делает. Полностью цикл не влез, посмотреть можно тут http://www.ben-gurion.com/templates/zoka/js/s5_responsive_mobile_bar.js

    syxov, 04 Сентября 2015

    Комментарии (212)
  4. C# / Говнокод #18672

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    public static string Get(this HttpWebRequest req)
            {
                string res;
                string ErrorCode="";
    
                try
                {
                    ErrorCode = "100";
                    Thread.Sleep(1000);
                    HttpWebResponse response = (HttpWebResponse)req.GetResponse();
                    Thread.Sleep(1000);
                    ErrorCode = "101";
                    Stream dataStream = response.GetResponseStream();
                    ErrorCode = "102";
                    StreamReader sr = new StreamReader(dataStream, Encoding.UTF8);
                    ErrorCode = "103";
                    res = sr.ReadToEnd();
                    ErrorCode = "104";
                }
                catch
                {
                    try
                    {
                        ErrorCode = "105";
                        Thread.Sleep(1000);
                        HttpWebResponse response = (HttpWebResponse) req.GetResponse();
                        Thread.Sleep(1000);
                        ErrorCode = "106";
                        Stream dataStream = response.GetResponseStream();
                        ErrorCode = "107";
                        StreamReader sr = new StreamReader(dataStream, Encoding.UTF8);
                        ErrorCode = "108";
                        res = sr.ReadToEnd();
                        ErrorCode = "109";
                    }
                    catch
                    {
                        try
                        {
                            ErrorCode = "110";
                            Thread.Sleep(1000);
                            HttpWebResponse response = (HttpWebResponse)req.GetResponse();
                            Thread.Sleep(1000);
                            ErrorCode = "111";
                            Stream dataStream = response.GetResponseStream();
                            ErrorCode = "112";
                            StreamReader sr = new StreamReader(dataStream, Encoding.UTF8);
                            ErrorCode = "113";
                            res = sr.ReadToEnd();
                            ErrorCode = "114";
                        }
                        catch
                        {
                            res = "Error doing get to " + req.RequestUri.AbsoluteUri + " ErrorCode: " + ErrorCode;
                        }
                    }
                }
    
                return res;
            }

    Нашел в проекте код до 2010 год, автор неизвестен :(

    kiberg, 04 Сентября 2015

    Комментарии (101)
  5. C# / Говнокод #18671

    −1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    var inited = Connectivity.Init().Result;
    inited = ServerService.Init().Result && inited;
    inited = AccountInfoService.Init().Result && inited;
    inited = InitMandatoryServices() && inited;
    
    IsInit = inited;

    vldalx, 04 Сентября 2015

    Комментарии (2)
  6. PHP / Говнокод #18670

    +1

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    <?php defined('START') or die;
     
    # For Licence and Disclaimer of this code, see http://coresky.net/license
    # Filename: unique
    # Portname: mysql_ php module (clear cloud)
     
    function trace($var, $show_error = false, $line = 0, $file = '', $context = null) {
        global $sky;
        if (!isset($sky)) return;
        if ($sky->debug || $sky->s_prod_error && true === $show_error) {
            is_string($var) or $var = var_export($var, true);
            if (is_string($show_error)) $var = "$show_error: $var" and $show_error = false;
            if ($has_deep = !$file) {
                $deep = 1 + $line;
                $trace = debug_backtrace();
                $file = $trace[$line]['file'];
                $line = $trace[$line]['line'];
            }
            $error = "$file:$line:\n" . html($var);
            if ($show_error) {
                $sky->was_arror = true;
                if (CLI) echo $has_deep ? "\n$file:$line:\n$var\n\n" : "\n$var\n\n";
                if ($sky->s_prod_error) {
                    $sky->error_prod .= NOW . ' - ' . START;
                    if (in_array(START, ['front', 'admin'])) $sky->error_prod .= ' uri: ' . html(URI);
                    $sky->error_prod .= "\n$error\n\n";
                }
            }
            if ($sky->debug) {
                if ($show_error) {
                    $sky->tracing .= "$file:$line:\n" . '<span class="error">' . html($var) . "</span>\n";
                    ob_start();
                    debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
                    $backtrace = html(ob_get_clean());
                    if ($sky->error_on_page) {
                        $sky->errors .= sprintf("<h1>%s</h1><pre>$error\n\n$backtrace</pre>", $sky->error_title ? $sky->error_title : 'User Error');
                        $sky->error_title = '';
                        if ($str = $sky->context($context, $has_deep ? $deep : 2)) $sky->errors .= "<pre>$str</pre>";
                    } else {
                        $sky->tracing .= "BACKTRACE:\n$backtrace\n";
                        if (AJAX) exit;
                        if (!CLI) echo "<br /><b>SKY:</b> " . html($var) . " at <b>$file</b> on line <b>$line</b>";
                    }
                    $sky->tracing .= "\n";
                } else $sky->tracing .= "$error\n\n";
            }
        }
    }
     
    function sql($sql, $deep = 1) {
        global $sky;
        if (in_array($mode = $sql[0], ['+', '-', '~', '@', '%', '^', '>'])) $sql = substr($sql, 1);
        if ($run = '^' != $mode) $result = mysql_query($sql);
        if (($sky->debug || $sky->s_prod_error) && $deep && $run) {
            $sky->qn++;
            if ($no = mysql_errno()) $sky->error_title = 'SQL Error';
            trace("SQL: $sql" . ($no ? ",\nERROR in MySQL - $no: " . mysql_error() : ''), (bool)$no, $deep);
        }
        switch (strtolower(substr($sql, 0, 6))) {
            case 'delete': case 'update': case 'replac': return mysql_affected_rows();
            case 'insert': return mysql_insert_id();
            case 'select': switch ($mode) {
                case '+': return mysql_result($result, 0);
                case '-': return mysql_fetch_row($result);
                case '~': return mysql_fetch_assoc($result);
                case '@': return fetch($result, 0);
                case '%': return fetch($result, 0, 'assoc');
                case '^': return sprintf("\$q = sql('%s', %d);", escape($sql, "'\\"), 1 + $deep) . fetch;
                case '>': return ($r = mysql_fetch_assoc($result)) ? (object)$r : null;
            }
        }
        return $result;
    }
     
    function sqlf() {
        $ary = func_get_args();
        $func = 'return is_array($v) ? _join($v, ", ", "' . strtolower(substr($sql = array_shift($ary), 0, 1)) . '") : $v;';
        return sql(vsprintf($sql, array_map(create_function('$v', $func), $ary)), 2);
    }
     
    function fetch($q, $p = false, $func = 'row') {
        if (is_bool($p)) return $p ? mysql_fetch_row($q) : mysql_fetch_assoc($q);
        $func = "mysql_fetch_$func";
        for ($cnt = mysql_num_fields($q), $ary = []; $r = $func($q); ) {
            $key = current(array_splice($r, $p, 1));
            if (1 == $cnt) $ary[] = $key;
            else $ary[$key] = 2 == $cnt ? current($r) : $r;
        }
        return $ary; # mysql_free_result($q);
    }
     
    define('fetch', 'if ($r = mysql_fetch_assoc($q)) extract($r, EXTR_PREFIX_ALL, "r"); return $r;');
     
    function cnt($q, $rows = true) {
        return $rows ? mysql_num_rows($q) : mysql_num_fields($q);
    }
     
    function _join($ary, $by = ', ', $x = false) {
        $keys = array_keys($ary);
        $vals = array_values($ary);

    http://ru.coresky.net/code
    Nuff said.

    corebug, 04 Сентября 2015

    Комментарии (0)
  7. JavaScript / Говнокод #18669

    −1

    1. 1
    this.tmpl('registration.button.back.content', {stepNumber: ~~stepNumber})

    Двойная тильда, Карл!!! *facepalm*

    Orion189, 04 Сентября 2015

    Комментарии (8)
  8. Куча / Говнокод #18667

    +5

    1. 1
    2. 2
    3. 3
    #id="map" {
      display: none !important;
    }

    css master

    develop_id666, 04 Сентября 2015

    Комментарии (3)
  9. PHP / Говнокод #18666

    +4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    public function isMobile()
    {
        // ...
    
        if (in_array (strtolower (substr ($user_agent, 0, 4)), array (
            '1207' => '1207', '3gso' => '3gso', '4thp' => '4thp', '501i' => '501i', '502i' => '502i', '503i' => '503i', '504i' => '504i',
            '505i' => '505i', '506i' => '506i', '6310' => '6310', '6590' => '6590', '770s' => '770s', '802s' => '802s', 'a wa' => 'a wa',
            'acer' => 'acer', 'acs-' => 'acs-', 'airn' => 'airn', 'alav' => 'alav', 'asus' => 'asus', 'attw' => 'attw', 'au-m' => 'au-m',
            'aur ' => 'aur ', 'aus ' => 'aus ', 'abac' => 'abac', 'acoo' => 'acoo', 'aiko' => 'aiko', 'alco' => 'alco', 'alca' => 'alca',
            'amoi' => 'amoi', 'anex' => 'anex', 'anny' => 'anny', 'anyw' => 'anyw', 'aptu' => 'aptu', 'arch' => 'arch', 'argo' => 'argo',
            'bell' => 'bell', 'bird' => 'bird', 'bw-n' => 'bw-n', 'bw-u' => 'bw-u', 'beck' => 'beck', 'benq' => 'benq', 'bilb' => 'bilb',
            'blac' => 'blac', 'c55/' => 'c55/', 'cdm-' => 'cdm-', 'chtm' => 'chtm', 'capi' => 'capi', 'cond' => 'cond', 'craw' => 'craw',
            'dall' => 'dall', 'dbte' => 'dbte', 'dc-s' => 'dc-s', 'dica' => 'dica', 'ds-d' => 'ds-d', 'ds12' => 'ds12', 'dait' => 'dait',
            'devi' => 'devi', 'dmob' => 'dmob', 'doco' => 'doco', 'dopo' => 'dopo', 'el49' => 'el49', 'erk0' => 'erk0', 'esl8' => 'esl8',
            'ez40' => 'ez40', 'ez60' => 'ez60', 'ez70' => 'ez70', 'ezos' => 'ezos', 'ezze' => 'ezze', 'elai' => 'elai', 'emul' => 'emul',
            'eric' => 'eric', 'ezwa' => 'ezwa', 'fake' => 'fake', 'fly-' => 'fly-', 'fly_' => 'fly_', 'g-mo' => 'g-mo', 'g1 u' => 'g1 u',
            'g560' => 'g560', 'gf-5' => 'gf-5', 'grun' => 'grun', 'gene' => 'gene', 'go.w' => 'go.w', 'good' => 'good', 'grad' => 'grad',
            'hcit' => 'hcit', 'hd-m' => 'hd-m', 'hd-p' => 'hd-p', 'hd-t' => 'hd-t', 'hei-' => 'hei-', 'hp i' => 'hp i', 'hpip' => 'hpip',
            'hs-c' => 'hs-c', 'htc ' => 'htc ', 'htc-' => 'htc-', 'htca' => 'htca', 'htcg' => 'htcg', 'htcp' => 'htcp', 'htcs' => 'htcs',
            'htct' => 'htct', 'htc_' => 'htc_', 'haie' => 'haie', 'hita' => 'hita', 'huaw' => 'huaw', 'hutc' => 'hutc', 'i-20' => 'i-20',
            'i-go' => 'i-go', 'i-ma' => 'i-ma', 'i230' => 'i230', 'iac' => 'iac', 'iac-' => 'iac-', 'iac/' => 'iac/', 'ig01' => 'ig01',
            'im1k' => 'im1k', 'inno' => 'inno', 'iris' => 'iris', 'jata' => 'jata', 'java' => 'java', 'kddi' => 'kddi', 'kgt' => 'kgt',
            'kgt/' => 'kgt/', 'kpt ' => 'kpt ', 'kwc-' => 'kwc-', 'klon' => 'klon', 'lexi' => 'lexi', 'lg g' => 'lg g', 'lg-a' => 'lg-a',
            'lg-b' => 'lg-b', 'lg-c' => 'lg-c', 'lg-d' => 'lg-d', 'lg-f' => 'lg-f', 'lg-g' => 'lg-g', 'lg-k' => 'lg-k', 'lg-l' => 'lg-l',
            'lg-m' => 'lg-m', 'lg-o' => 'lg-o', 'lg-p' => 'lg-p', 'lg-s' => 'lg-s', 'lg-t' => 'lg-t', 'lg-u' => 'lg-u', 'lg-w' => 'lg-w',
            'lg/k' => 'lg/k', 'lg/l' => 'lg/l', 'lg/u' => 'lg/u', 'lg50' => 'lg50', 'lg54' => 'lg54', 'lge-' => 'lge-', 'lge/' => 'lge/',
            'lynx' => 'lynx', 'leno' => 'leno', 'm1-w' => 'm1-w', 'm3ga' => 'm3ga', 'm50/' => 'm50/', 'maui' => 'maui', 'mc01' => 'mc01',
            'mc21' => 'mc21', 'mcca' => 'mcca', 'medi' => 'medi', 'meri' => 'meri', 'mio8' => 'mio8', 'mioa' => 'mioa', 'mo01' => 'mo01',
            'mo02' => 'mo02', 'mode' => 'mode', 'modo' => 'modo', 'mot ' => 'mot ', 'mot-' => 'mot-', 'mt50' => 'mt50', 'mtp1' => 'mtp1',
            'mtv ' => 'mtv ', 'mate' => 'mate', 'maxo' => 'maxo', 'merc' => 'merc', 'mits' => 'mits', 'mobi' => 'mobi', 'motv' => 'motv',
            'mozz' => 'mozz', 'n100' => 'n100', 'n101' => 'n101', 'n102' => 'n102', 'n202' => 'n202', 'n203' => 'n203', 'n300' => 'n300',
            'n302' => 'n302', 'n500' => 'n500', 'n502' => 'n502', 'n505' => 'n505', 'n700' => 'n700', 'n701' => 'n701', 'n710' => 'n710',
            'nec-' => 'nec-', 'nem-' => 'nem-', 'newg' => 'newg', 'neon' => 'neon', 'netf' => 'netf', 'noki' => 'noki', 'nzph' => 'nzph',
            'webc' => 'webc', 'whit' => 'whit', 'winw' => 'winw', 'wmlb' => 'wmlb', 'xda-' => 'xda-'
        ))) {
            return true;
        }
        return false;
    }

    Я правда не знаю что это ваще и зачем.

    creaturemyst, 03 Сентября 2015

    Комментарии (12)
  10. JavaScript / Говнокод #18665

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    function checkIfLogged(){
        var user = localStorage.getItem('user');
        if(!user) {
            logout();
            window.location.hash = '#/login';
            return false;
        } else {
            return true;
        }
    }

    kon_simeonov, 03 Сентября 2015

    Комментарии (0)