FA TextViewer

Allows for online viewing of all text based submissions of FurAffinity

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         FA TextViewer
// @namespace    FurAffinity
// @version      2.0.2
// @description  Allows for online viewing of all text based submissions of FurAffinity
// @author       JaysonHusky
// @match        https://www.furaffinity.net/view/*/
// @grant        none
// @run-at       document-end
// @require      https://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function() {
    'use strict';
$(document).ready(function(){
    var TemplateStyle=$('body').attr('data-static-path');
    var is_book=$("meta[property='og:type']").attr("content");
    var SubmissionDownloadURL="";
    if(TemplateStyle=="/themes/beta"){
        SubmissionDownloadURL=$('a.download-logged-in').attr('href');
        $('#submissionImg').after('<br/><br/><iframe style="width: 900px; height: 900px;" src="https://docs.google.com/gview?url=https:'+SubmissionDownloadURL+'&embedded=true" height="240" width="320" frameborder="0"></iframe>');
    }
    else if(TemplateStyle=="/themes/classic"){
        SubmissionDownloadURL=$('div#text-container a').attr('href');
        $('#submissionImg').after('<br/><br/><iframe style="width: 900px; height: 900px;" src="https://docs.google.com/gview?url=https:'+SubmissionDownloadURL+'&embedded=true" height="240" width="320" frameborder="0"></iframe>');
    }
    else {
        console.log('FA Online Viewer is only activated on story/poetry submissions.');
    }
});
})();