• Stefy Spora's avatar
    Improve story-data parsing to extract from attributes · 48578dba
    Stefy Spora authored
    - Update getCurrentMediaData to parse script tag with id 'story-data'
    - Extract data from attributes.pictures for pictures:
      * title, caption, description, tags_names as tags, user_tags_ids as userTags
    - Extract data from attributes.videos for videos:
      * title, description, tags_names as tags, user_tags_ids as userTags (no caption)
    - Add fallback to direct attributes and root level data
    - Update both content.js and background.js injected functions
    - Preserve existing tags and user tags when updating privacy
    - Use parsed data in XHR payloads instead of empty defaults
    48578dba
background.js 24.2 KB