PPT Viewer

To view the teacher's ppt when in class.

目前为 2020-05-19 提交的版本。查看 最新版本

// ==UserScript==
// @name         PPT Viewer
// @namespace    http://tampermonkey.net/
// @version      0.0.3
// @description  To view the teacher's ppt when in class.
// @author       4e1a607a
// @match        https://*.eeo.cn/upload/trans/ppt*/html5/index.html
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    $('html').html('<head><meta charset="utf-8"></head><body><button id="show-all" style="position: sticky; left: 1000px;">Show All</button><button id="normal" style="position: sticky; left: 1100px;">Normal</button></body>').css("overflow", "auto");
    function printpage(page) {
        $('body').append(`<div id='p${page}'></div>`)
        $.ajax({
            type: "GET",
            url: `data/slide${page}.css`,
            success: function(data){
                $('head').append(`<style>${data}</style>`);
            },
        });
        $.ajax({
            type: "GET",
            url: `data/slide${page}.js`,
            success: function(data){
                var s = data.substr(data.match('<div').index);
                s = s.substr(0, s.length-8);
                $(`#p${page}`).html(s).css('position', 'absolute').css('top', 600*page-600);
                $(`#p${page} div, span, img, svg, path`).css('position', 'absolute');
                printpage(page+1);
            },
        });
    };
    printpage(1);
    $('#show-all').on('click', function(){
        $('div').css('display', 'block');
    });
    $('#normal').on('click', function(){
        $('div').css('display', '');
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址