-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
21 lines (13 loc) · 4.11 KB
/
index.html
File metadata and controls
21 lines (13 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Export-FeedWordPress</title>
</head>
<body>
<h1>Export-FeedWordPress</h1>
<p>Bookmarklet to save a file containing all of the subscribed other sites (child sites for a motherblog). It can only capture EITHER the "Subscribed" or "Inactive", which ever page you're currently viewing. If you want to save both lists, you must click the bookmarklet once on the subscribed page, then navigate to Inactive, and click it again.</p>
<p>Simply drag this link: <a href="javascript:(function%20everything()%20%7B%20%20function%20doTheExport()%20%7B%20%20%20%20var%20%24%20%3D%20window.jQuery%3B%20%20%20%20var%20subscribedOrInactive%20%3D%20%24(%27ul.subsubsub%20a.current%27).text()%3B%20%20%20%20if%20(subscribedOrInactive.indexOf(%27(%27)%20!%3D%3D%20-1)%20%7B%20%20%20%20%20%20subscribedOrInactive%20%3D%20subscribedOrInactive.substring(0%2C%20%24(%27ul.subsubsub%20a.current%27).text().indexOf(%27(%27)).trim()%3B%20%20%20%20%7D%20%20%20%20var%20sites%20%3D%20%7B%7D%3B%20%20%20%20var%20motherBlogTitle%20%3D%20%24(%27%23wp-admin-bar-site-name%3Ea%27).text()%3B%20%20%20%20var%20downloadTitle%20%3D%20motherBlogTitle%20%2B%20%27-%27%20%2B%20subscribedOrInactive%20%2B%20%27-site-subscriptions.opml%27%3B%20%20%20%20%24(%27table.widefat%20tr%27).each(function%20(x%2C%20item)%20%7B%20%20%20%20%20%20var%20siteTitle%20%3D%20%24(item).find(%27td%3Anth-child(2)%20strong%20a%27).text()%3B%20%20%20%20%20%20var%20siteURL%20%3D%20%24(item).find(%27td%3Anth-child(3)%20a%27).attr(%27href%27)%3B%20%20%20%20%20%20sites%5BsiteURL%5D%20%3D%20siteTitle%3B%20%20%20%20%7D)%3B%20%20%20%20function%20outlineFor(title%2C%20url)%20%7B%20%20%20%20%20%20return%20%27%5Ct%5Ct%3Coutline%20text%3D%22%27%20%2B%20title%20%2B%20%27%22%20title%3D%22%27%20%2B%20title%20%2B%20%27%22%20type%3D%22rss%22%20xmlUrl%3D%22%27%20%2B%20url%20%2B%20%27%22%20%2F%3E%5Cn%27%3B%20%20%20%20%7D%20%20%20%20var%20output%20%3D%20%27%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%5Cn%3Copml%20version%3D%221.0%22%3E%5Cn%5Ct%3Chead%3E%3Ctitle%3E%27%20%2B%20motherBlogTitle%20%2B%20%27%3C%2Ftitle%3E%3C%2Fhead%3E%5Cn%5Ct%3Cbody%3E%5Cn%27%3B%20%20%20%20var%20outputSuffix%20%3D%20%27%5Ct%3C%2Fbody%3E%5Cn%3C%2Fopml%3E%27%3B%20%20%20%20Object.keys(sites).forEach(function%20(url)%20%7B%20%20%20%20%20%20var%20title%20%3D%20sites%5Burl%5D%3B%20%20%20%20%20%20if%20(title.trim().length%20%3E%200)%20%7B%20%20%20%20%20%20%20%20output%20%2B%3D%20outlineFor(title%2C%20url)%3B%20%20%20%20%20%20%7D%20%20%20%20%7D)%3B%20%20%20%20output%20%2B%3D%20outputSuffix%3B%20%20%20%20%2F*%20with%20many%20thanks%20to%3A%20http%3A%2F%2Fstackoverflow.com%2Fa%2F18197511%2F1449799%20*%2F%20%20%20%20function%20download(filename%2C%20text)%20%7B%20%20%20%20%20%20var%20pom%20%3D%20document.createElement(%27a%27)%3B%20%20%20%20%20%20pom.setAttribute(%27href%27%2C%20%27data%3Atext%2Fplain%3Bcharset%3Dutf-8%2C%27%20%2B%20encodeURIComponent(text))%3B%20%20%20%20%20%20pom.setAttribute(%27download%27%2C%20filename)%3B%20%20%20%20%20%20if%20(document.createEvent)%20%7B%20%20%20%20%20%20%20%20var%20event%20%3D%20document.createEvent(%27MouseEvents%27)%3B%20%20%20%20%20%20%20%20event.initEvent(%27click%27%2C%20true%2C%20true)%3B%20%20%20%20%20%20%20%20pom.dispatchEvent(event)%3B%20%20%20%20%20%20%7D%20else%20%7B%20%20%20%20%20%20%20%20pom.click()%3B%20%20%20%20%20%20%7D%20%20%20%20%7D%20%20%20%20download(downloadTitle%2C%20output)%3B%20%20%7D%20%20if%20(!window.jQuery)%20%7B%20%20%20%20var%20script%20%3D%20document.createElement(%22script%22)%3B%20%20%20%20script.src%20%3D%20%22%2F%2Fcode.jquery.com%2Fjquery-1.11.3.min.js%22%3B%20%20%20%20document.head.appendChild(script)%3B%20%20%20%20%24.ready(function%20()%20%7B%20%20%20%20%20%20console.log(%27jquery%20ready%27)%3B%20%20%20%20%20%20doTheExport()%3B%20%20%20%20%7D)%3B%20%20%7D%20else%20%7B%20%20%20%20console.log(%27already%20had%20jquery%27)%3B%20%20%20%20doTheExport()%3B%20%20%7D%7D)();">Export Feed WordPress</a> to your bookmarks bar.</p>
<p>Find the source code on <a href="https://github.com/Networked-Learning-Initiatives/Export-FeedWordPress/">this project's github page</a></p>
</body>
</html>