Help:Gadget-ACDC/sv
![]() | Detta är dokumentationen för AC/DC, en Javascript-finess som kan aktiveras i dina inställningar. Själva skriptet finns på MediaWiki:Gadget-ACDC.js. |
![]() | Behöver du mer hjälp kan du fråga på diskussionssidan eller på Commons:Help desk. Dokumentation: |
![AC/DC [knapp för att publicera ändringar]; Filer att redigera: [sex filnamn]; Uttalanden att lägga till: avbildar Caroline Zhang med uttryck, gest eller kroppspose, Biellmann-spinn; [lägg till uttalande-knapp]](http://178.128.105.246/cars-https-upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Add_to_Commons_Descriptive_Claims_-_Caroline_Zhang.png/400px-Add_to_Commons_Descriptive_Claims_-_Caroline_Zhang.png)
AC/DC eller ACDC, förkortning av Add to Commons / Descriptive Claims, (svenska: Lägg till på Commons / Beskrivande påståenden) är en finess för att lägga till en samling strukturerade datauttalanden till en samling filer.
Installation
Aktivera finessen i dina inställningar. Det ser ut så här:
Add to Commons / Descriptive Claims (ACDC): Add a collection of structured data statements to a set of files. [documentation / talk]
Användning
The gadget adds a “AC/DC” link to the Tools section of the sidebar; click it to open the main dialog. Enter the names of the files you want to edit in the input field, and edit the statements below it, using the regular structured commons user interface elements. When you’re ready, click the big blue button at the top (“publish changes” in English, but it may be translated) to start adding these statements to all the listed files. Do not close the browser window/tab until the dialog is done and closes itself (a progress bar should have appeared at the top).
You can paste multiple titles into the file list (with or without the “File:” prefix, or even full URLs), separated by pipe (|), tab or line break characters. After pressing Enter, they will be split up accordingly. Note, however, that this gadget does not scale well with lots of files; there’s no hard limit, but just adding several hundred titles to the input will hang the browser for some seconds, and I have not yet tried actually making edits at that scale. Most likely, it would just take ages, and you would have to keep your device running and your browser open for that entire time.
You can also add all the files in a category or a PagePile, by clicking the icon and then the “Load category” or “Load PagePile” buttons, then entering the category title or PagePile ID into the dialog that opens afterwards; alternatively, paste the category or PagePile URL directly into the input field. The same considerations as in the previous paragraph apply – this will likely not scale well to thousands of files. (The user interface also becomes somewhat unwieldy if the list of files is too long, so you probably want to define the statements to add first, and only load the category or PagePile at the end.)
If Cat-a-lot is enabled, then you can also use it to select some files, and those files will be added when you open AC/DC. (You can still add more files to AC/DC afterwards as described above.)
If a statement with the same value as one you want to add already exists on a file, then any missing qualifiers will be added to the existing statement, and it will be marked as prominent if you specified so. Otherwise, a new statement will be added.
By default, AC/DC will start out with a field for “depicts” statements, so that you can directly add depicted items, or add other properties for which you want to add statements. You can customize this by configuring the window.acdcFavoriteProperties
in your common.js; for example, to start out with the properties depicts (P180), creator (P170) and copyright license (P275), add the following code:
window.acdcFavoriteProperties = [
'P180',
'P170',
'P275',
];
If you always want to select the properties yourself, you can remove the default properties with:
window.acdcFavoriteProperties = [];
There is also preliminary support for removing statements. If you add the line window.acdcEnableRemoveFeature = true;
to your common.js (example), then a second section of statements to remove will appear below the statements to add; on the listed files, every statement with a matching property and value will be removed. (This feature will eventually be enabled by default, but the user interface may be improved first.) The aforementioned window.acdcFavoriteProperties
applies to both statement sections together; to modify the list of properties in only one of the sections, you can use window.acdcFavoritePropertiesToAdd
and window.acdcFavoritePropertiesToRemove
instead.
Lokalisering
Översättningar för användargränssnittet definieras på MediaWiki:Gadget-ACDC-i18n.json. (Endast administratörer och gränssnittsadministratörer kan redigera sidan så du kan behöva använda {{Edit request}} och/eller nämna utvecklaren.)
Utveckling
Utveckling utförs på GitHub.
Kända problem
In general, this gadget is coupled rather tightly to WikibaseMediaInfo internals and implementation details, and as a result may break in unintended ways. If you notice something wrong, please notify the developer as soon as possible.
Övervakning
Since 19 september 2019, edits made through this gadget have been tagged as “AC/DC”; you can find them in the recent changes. (Prior to that date, there was no certain way to find or distinguish ACDC edits.)
Since 10 februari 2022, an edit group is automatically created when ten or more files are edited at once. The edit group offers a convenient place to discuss the edits, or revert them all if necessary.