postcard milestones.js - dynamiccookies/postcrossing-wikipedia GitHub Wiki

This script shouldn't need to be used again, unless there is a mass change needed for the entire Postcrossing Milestones table.

Please use this with caution, as it does not update everything in the table. See the note below.

Steps

  1. Copy the code in postcrossing-milestones.js

  2. Using a Chrome or Edge browser, navigate to the "Postcrossing Wikipedia Page - Need Help" community post

  3. Press the F12 key to open the Developer Tools pane

  4. In the Console pane that just opened, paste the code you copied in Step 1

  5. Press Enter and the script should run and successfully return the results

  6. Click the Copy option just below the results

  7. Now navigate to the Postcrossing Wikipedia page's Postcard Milestones edit page

  8. Right click the browser tab and select Duplicate

This is where the manual process comes in.

  1. In one tab, select everything in the edit pane and paste your code to replace it

  2. Now go to the duplicate tab and you will need to copy each reference individually from the Million column and paste them into the code in your other browser tab (make sure to paste them in the correct place)

  3. Once you've finished copying all of the missing references, copy each milestone over 60 as well, because those were not included in the Postcrossing Community post

  4. After all of the missing content has been copied over, click the 'Show preview' button to confirm the tables have been updated

  5. If everything looks good, scroll back down to the edit pane and click the blue 'Publish changes' button

Note

Please do not simply paste and replace the current Postcard Milestones table on the Postcrossing Wikipedia page without manually copying the missing references and rows. The code returned from this script does not include the manually added references in the Millions column on that page or any new milestones after 60 million.


Each HTML Table Row Converts From This:

<tr dir="ltr">
  <td dir="ltr">1</td>
  <td dir="ltr">April 11, 2008 03:03 pm</td>
  <td dir="ltr">Turkey</td>
  <td dir="ltr">Romania</td>
  <td dir="ltr">
    <a 
      href="https://www.postcrossing.com/postcards/TR-8482" 
      rel="nofollow" 
      target="_blank" 
      class="linkify-word no-track-link"
    >
      TR-8482
    </a>
  </td>
</tr>

To This:

|-
| 1 || April 11, 2008 || 3:03 pm || {flag|Turkey}} || {flag|Romania}} || TR-8482<ref>
{{cite web 
  |url=https://www.postcrossing.com/postcards/TR-8482 
  |title=Postcard TR-8482 
  |date=April 11, 2008 
  |website=Postcrossing 
  |access-date=February 16, 2021
}}</ref>
⚠️ **GitHub.com Fallback** ⚠️