2021부터 안전교육방식이 바뀌었네요 아래걸로 대신 붙여넣으면 되는데 6초만에 강의들은걸로 기록이 찍힙니다.  궁서체입니다. 문제가 발생할수있으니 정상적인방법으로 듣기를 추천합니다. 왜냐하면 이제는 동영상방식이라 안듣고있어도 한챕터가 끝나기 때문입니다.

    그래도 사용하시려면 아래 더보기를 누르세요

    더보기

    안전교육 매크로입니다ㅡㅡ

     

    1. 크롬실행

     

    2.https://chrome.google.com/webstore/detail/custom-javascript-for-web/ddbjnfjiigjmcpcpkmhogomapikjbjdk?hl=ko

     

    이거설치

     

    3.안전교육 페이지 접속해서 오른쪽위에 생긴 파란색 cjs누르기

     

    이렇게 뜨면 새로고침

     

     

    왼쪽위에 주소랑 그아래 jQuery2.1.0확인하고

     

    그아래칸에 

    var iframe = document.querySelector('iframe');
    var player = new Vimeo.Player(iframe);
    var duration;
    function final(){
        setTimeout(function(){
            player.getSeekable().then(function(seekable) {
                duration = Math.floor(seekable[0][1]);
            }).catch(function(error) {
            });
            
            var current_time=duration;
            var ntime = parseInt(new Date().getTime()+duration).toString().substring(0,10);
            var a = encodeURIComponent($("#vid").val());
            var lang= "k";
            $.ajax({
            	type: "POST",
            	async: true,
            	url: "/html/safety_ajax.php",
            	dataType: "html",
            	data: "mid="+location.href.split("=")[1].split("&")[0]+"&act=getComplete&a="+a+"&b="+current_time+"&ntime="+ntime+"&lang="+lang,
            	success: function(response, status, request) {
        		    console.log(response);
            		if (response=="N") {
            		    window.close();
            		} else {final();}
            	},
            	error:function(request,status,error) {
            		alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
            	}
            });
        },3000);
    }
    final();

    이거 붙여넣고 SAVE

    ※크롬에서 안전교육이 안켜지면 로딩중인 안전교육창 주소표시줄 주소 왼쪽에 자물쇠 누르고 플래시를 요청에서 허용으로 바꿔주면됩니

    이제 교육수강 시작하면 자동으로 넘어갈겁니당ㅎ

     

    아래는 예전코드
    function page_complete() { var ntime = parseInt(new Date().getTime().toString().substring(0, 10)); $.ajax({ type: "GET", async: true, url: "/html/safety_ajax.php", dataType: "html", data: location.href.split("?")[1].replace("view","")+"&amp;nnid=&amp;ntime="+ntime, success: function(response, status, request) { if (response == "Y") { $(".yu").text("됐당ㅎ"); opener.window.location='/course.php?'+location.href.split("?")[1].split("&amp;")[0]+'&amp;lang=k'; var stage = $("#box6").text().split("/"); if (stage[0]==stage[1]){ alert ("다 끝났다!! 다음강의 넘겨주세요"); window.close(); } else{ direct_page(parseInt(getCurrentPageNumber())+1); } }else{ setTimeout(function(),2000); } } }); } function wait(){ if($("#loading-image").attr("style")=="display: none;"){ page_complete(); clearInterval(myscript); $("body").prepend(`<div class="yu" style="background: #f55; padding: 8px; text-align: center;">매크로 작동중ㅎㅎ <a href="&lt;a href=http://medscientist.tistory.com/22&gt;http://medscientist.tistory.com/22&lt;/a&gt;">?</a></div>`); } } var myscript = setInterval(function() ,100);

    마지막페이지에서는 알림창이 뜨니 확인하고 다음강의 틀어주세요

     

    참고: 폭력예방교육은 크롬 IE, 엣지, 크롬시크릿모드 전부 동원하면됨

     

    Posted by 뭐하라