Greasy Fork

Doulou Dalu - bring in google doc properly

Inserts article inline instead of google doc

目前为 2016-11-06 提交的版本。查看 最新版本

// ==UserScript==
// @name         Doulou Dalu - bring in google doc properly
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Inserts article inline instead of google doc
// @author       You
// @match        bluesilvertranslations.wordpress.com/*
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';

    $('.entry-content').prepend('<div id="iframe-content"></div>');
    
    var frame = $('.entry-content > iframe:first');
    var frameUrl = frame[0].src;
    
    //console.log(frameUrl);
    
    $.get(frameUrl, function(data) {
        $('#iframe-content').html(data);
        
        //console.log("data");
        //console.log(data);
    });
    
    $('.entry-content > iframe:first').delay(500).remove();
})();