Plonter Save Builds Plugin

Allows you to save & load builds on plonter

目前為 2017-02-10 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Plonter Save Builds Plugin
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Allows you to save & load builds on plonter
// @author       DaCurse0
// @copyright    2017+, DaCurse0
// @match        http://www.plonter.co.il/buildyourownpc-v2.tmpl
// @require      https://code.jquery.com/jquery-latest.min.js
// @namespace    https://greasyfork.org/users/62051
// ==/UserScript==

$(function(){function c(a){return sPos=String(a),'<li style="direction:rtl;margin-left:30px;">מפרט #'+sPos+': <a href="#" id="save'+sPos+'"><u>שמור</u></a>  <a href="#" id="load'+sPos+'"><u>טען</u></a></li>'}var a="position:fixed;z-index:2147483647;background-color:white;top:278px;right:10px;width:200px;height:190px;border-radius:6px;box-shadow:0px 0px 5px 0px #000000;direction:ltr;",b='<div id="spl_main" style="'+a+'"><h4 style="text-align:center;"><u><b>פלאגין שמירת מפרטים</b></u></h4><ul style="list-style:none;" id="spl_list"></ul><a href="#" id="spl_reset" style="color:red;text-decoration:underline;margin-left:58%;">אפס מפרטים</a></div>';$(".inner_wrapper").append(b),$("#spl_reset").on("click",function(){if(!confirm("האם אתה בטוח שברצונך לאפס את כל המפרטים ששמרת?"))return!1;for(var a=1;a<=5;a++)delete localStorage["savedConfig"+String(a)];alert("כל המפרטים נמחקו בהצלחה")});for(var d=1;d<=5;d++)$("#spl_list").append(c(d)),$("#save"+String(d)).on("click",function(){var a="savedConfig"+$(this).attr("id").substr(4);localStorage[a]=localStorage.savedConfiguration,alert("נשמר בהצלחה!")}),$("#load"+String(d)).on("click",function(){var a="savedConfig"+$(this).attr("id").substr(4);return"undefined"==typeof localStorage[a]?(alert("לא נשמר פה כלום..."),!1):(localStorage.savedConfiguration=localStorage[a],void location.reload())})});