How to insert the second link correctly in js?

  • 0
    I'm trying to insert my second link into js, ​​the original script is like this:

    function MenuNewsBuild(a,b,d,e){var c=[];d==1&&(c[0]="<a onclick=\"ajax_prep_for_edit('"+a+"', '"+b+'\'); return false;" href="#">'+menu_short+"</a>");""!=dle_admin&&(c[1]='<a href="'+dle_root+dle_admin+"?mod=editnews&action=editnews&id="+a+'" target="_blank">'+menu_full+"</a>");
    allow_dle_delete_news&&(c[2]="<a onclick=\"sendNotice ('"+a+'\'); return false;" href="#">'+dle_notice+"</a>",c[3]="<a onclick=\"dle_news_delete ('"+a+'\'); return false;" href="#">'+dle_del_news+"</a>");e==1&&(c[3] = "<a onclick=\"dle_news_delete ('" + a + '\'); return false;" href="#">' + dle_del_news + "</a>");
    return c}


    I insert the second link like this:

    function MenuNewsBuild(a,b,d,e){var c=[];d==1&&(c[0]="<a onclick=\"ajax_prep_for_edit('"+a+"', '"+b+'\'); return false;" href="#">'+menu_short+"</a>");""!=dle_admin&&(c[1]='<a href="'+dle_root+dle_admin+"?mod=editnews&action=editnews&id="+a+'" target="_blank">'+menu_full+"</a>");
    allow_dle_delete_news&&(c[2]="<a onclick=\"sendNotice ('"+a+'\'); return false;" href="#">'+dle_notice+"</a>",c[3]="<a onclick=\"dle_news_delete ('"+a+'\'); return false;" href="#">'+dle_del_news+"</a>");e==1&&(c[3] = "<a onclick=\"dle_news_delete ('" + a + '\'); return false;" href="#">' + dle_del_news + "</a>");
    allow_dle_delete_news&&(c[2]="<a onclick=\"sendNotice ('"+a+'\'); return false;" href="#">'+dle_notice+"</a>",c[3]="<a onclick=\"dle_news_stop ('"+a+'\'); return false;" href="#">'+dle_stop_news+"</a>");e==1&&(c[3] = "<a onclick=\"dle_news_stop ('" + a + '\'); return false;" href="#">' + dle_stop_news + "</a>");
    return c}


    As a result, only the new link is displayed, the old one disappears.

    How to insert the second link dle_news_stop correctly?

    Thank you!
    JavaScript Anonymous, Jul 13, 2020

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!