AO3 clone fic title, author, and summary at bottom

Duplicate the information of fic title, author and summary at the bottom of the page

当前为 2022-02-15 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)


    // ==UserScript==
    // @name         AO3 clone fic title, author, and summary at bottom
    // @namespace    https://greasyfork.org/en/users/876643-elli-lili-lunch
    // @version      0.9
    // @description  Duplicate the information of fic title, author and summary at the bottom of the page
    // @author       Elli-lili-lunch, based off work from scriptfairy
    // @include      /https?://archiveofourown\.org/works/\d+/
    // @require      http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js
    // @grant        none
    // @license MIT
    // ==/UserScript==

    (function($) {
        $(document).ready(function() {
        // new attempt
            var summary = $('div.preface .summary').clone();
            $('#feedback').parent().after(summary);
            var author = $('div.preface .byline').clone();
            //$('#feedback').parent().after(author);
            var format = " by "
            //$('#feedback').parent().after(format);
            var title = $('div.preface .title.heading').clone();
            $('#feedback').parent().after(author); + $('#feedback').parent().after(format); + $('#feedback').parent().after(title);
            //document.write("test text") #completely overwrote entire page //more research has been done, looks like this is mostly jquery lol


        });
    })(window.jQuery);


           // var test = $('div.preface').clone();
           // $('#feedback').parent().after(test);
        // old:
            //var summary = $('div.preface .summary').clone();
            //$('#feedback').parent().after(summary);
            ///var author = $('div.preface .byline').clone();
            //$('#feedback').parent().after(author);
            //var title = $('div.preface .title.heading').clone();
            //$('#feedback').parent().after(title);

            /*
            would be neato frito if upon clicking "bookmark(?) if it was empty, the box would autopopulate with:
                 title by author
                 summary: text

                 ^^ ideal format

            potential: (learned from http://www.tizag.com/javascriptT/javascriptif.php)
            var bookmark_content = //locate variable from AO3 to identify bookmark box contents;

            if(bookmark_content == "null"){
	            document.write("insert formatted reference info now");
            }else{
	            //dont' do anything ig
            }
                     // If the length of the element's string is 0 then display helper message
function notEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return false;
	}
	return true;
}

            */

            /* IMPORTANT TO IDENITFY ELEMENTS FROM AO3:
                 words: $('.meta .stats dl dd.words');
                 current bookmark text:
                      <textarea rows="4" id="bookmark_notes" class="observe_textlength"
                      aria-describedby="notes-field-description" name="bookmark[bookmarker_notes]"></textarea>
                 author: $('div.preface .byline')
                 title: $('div.preface .title.heading')


            */