Redigerer
Wikisida.no:Friendly
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
:''«WP:FRIENDLY» omdirigeres hit. Se [[:en:Wikipedia:Civility|civility policy]], [[:en:Wikipedia:Do not insult the vandals|Do not insult the vandals]] eller [[:en:Wikipedia:Please do not bite the newcomers|Please do not bite the newcomers]].'' {{snarvei|WP:VENN|WP:FRIENDLY|WP:FRIEND}} <!--{{warning|Be advised that even when using these scripts, '''you''' take '''full''' responsibility for '''any''' action done using them. You '''must''' understand the [[Wikipedia:Policies and guidelines|Wikipedia policies]] and use this tool '''within''' that policy, or risk being [[Wikipedia:Blocking policy|'''blocked''']] for its misuse.}}--> <!--{{caution|At the moment Friendly is in development, so support for browsers other than Firefox might slip in and out, and bugs I miss might give some people major headaches.}}--> {{tocright|limit=3}} Velkommen til '''Friendly'''. == Hva er Friendly? == '''Friendly''' er en samling av [[JavaScript]] som gir brukeren et grensesnitt tilsvarende [[Wikipedia:Twinkle|Twinkle]] (ved å bruke [[:en:User:AzaToth/morebits.js|:en:morebits]]/[[Bruker:Nsaa/morebits.js]] JavaScript-bibliotek) for Wikipedias mer vennlige og samarbeidsorienterte oppgaver. Foreløpig er følgende ting implementert noen av velkomstmalene (''[[:en:WP:Welcome templates|:en:welcome templates]]''), (''[[:en:Category:Shared IP addresses|:en:shared IP address]]'') (''[[:en:Category:Shared IP header templates|:en:tagging]]''), (''[[:en:WP:Templates|:en:article space templates]]''), (''[[:en:Template:talkback|:en:talkback]]''), (''[[:en:Wikipedia:Friendly#friendlytabs|:en:tab shortening]]'') og en kjekk [[UTC|UTC-klokke]] som vil laste den aktuelle siden på nytt (''[[:en:WP:PURGE|:en:purge]]'') når den trykkes på. Denne funksjonaliteten sørges for vha. fanene navngitt "tb", "wel" og "shared ip" når man er på en brukerdiskusjonside og "tag" når i artikkelrommet. En "welcome"-lenke er også plassert på [[:en:WP:DIFF|:en:diff]]-siden ved siden av brukere som har en tom (''[[:en:WP:RED|:en:empty]]'') diskusjonside. <!-- More features are always in the pipeline and Friendly is under ongoing development, so be sure to report any bugs or request new features on [[Wikipedia talk:Friendly|Friendly's talk page]]. === Notes === * All scripts on this page are only tested on '''[http://www.getfirefox.com/ Mozilla Firefox 3]'''. They may not work on other browsers. * The script is compatible with '''Twinkle''', and will add additional Twinkle style function tabs. * If using Windows, '''ZoneAlarm''' might break these scripts. * '''Norton Internet Security''' (specifically, AntiSpam) will hijack the [[HTTP]] stream and append data, with the result that the data is malformed [[XML]] (the XML standard requires one root node only), breaking Friendly. This can be fixed by disabling popup blocking. * If using the [[Wikipedia:Vector|Vector]] skin or the Beta interface, Friendly must be loaded via gadget or your [[Special:Mypage/vector.js|vector.js]] file. == Functionality == Friendly adds additional features to various parts of Wikipedia. Each tab's ID is given to assist with further customization via additional user [[Cascading Style Sheets|CSS]] or JavaScript. === All Namespaces === ==== friendlyclock ==== The '''friendlyclock''' feature inserts an updating UTC clock in the top right-hand corner of the screen so that the UTC time is always visible and handy. This feature also allows the ability to easily [[WP:PURGE|purge]] the current page by simply clicking on the clock. If you have other scripts or gadgets installed that add a UTC clock to the screen, you may want to disable them, or disable this feature of Friendly. The feature can be entirely disabled by setting the <code>enableClock</code> configuration parameter to <code>false</code>. This feature is not available if you have Friendly installed as a [[WP:GADGET|gadget]]. Element ID: <code>friendly-clock</code> ==== "welcome" from Diff ==== [[Image:Friendly Welcome From Diff.png|thumb|Friendly's welcome option displayed in diff.]] A '''welcome''' link will appear next to a user in a diff view if the user's talk page is empty. This allows you to quickly welcome the user with the template specified in the <code>[[#quickWelcomeTemplate|quickWelcomeTemplate]]</code> parameter (by default) or easily open the user's talk page with Friendly's welcome dialogue already visible (if the <code>[[#quickWelcomeMode|quickWelcomeMode]]</code> parameter is set to <code>semiauto</code>). This feature is available when viewing any diff across all namespaces. ==== friendlytabs ==== The '''friendlytabs''' feature can be used to shorten all of the common, long tab names that Wikipedia uses. For example, "edit this page" is changed to "edit" and "discussion" to "talk", by default. This gives Friendly users more room for a variety of extra function tabs by shortening the amount of space that common tabs take up. This feature can be configured or disabled; see the configuration section for details. === User Talk Namespace === ==== "tb" Tab ==== The '''tb''' tab will allow you to easily leave {{tl|talkback}} templates on other users' talk pages. It supports all of the talkback template's options that you would have available as if you were leaving the template by hand. Tab element ID: <code>friendly-talkback</code> ==== "wel" Tab ==== [[Image:Friendly Welcome Tab.PNG|thumb|Friendly's welcome functionality.]] The '''wel''' tab will welcome the user with selected template. If an article is specified in the input field, and the template supports an article link, Friendly will automatically link the template to the article you specified. All templates that support this are marked with an asterisk ("*"). In the case of normal welcome templates, the article would be one that the user contributed positively to. In the case of problem user welcome templates, the article would be one that the user vandalized or did not contribute positively to. This input field is automatically populated if the <code>vanarticle</code> URL parameter is found, which is populated by Twinkle after doing a rollback. Friendly is capable of supporting a custom list of templates that displays below the standard set of Welcome templates. If you have installed Friendly, you can add a list of templates that you would like to be added to the Welcome dialogue by properly defining the <code>customWelcomeList</code> parameter in Friendly's configuration. Any templates added to this list, when selected, will simply be placed on the user's talk page with no heading, no arguments, and will be followed by your signature. Tab element ID: <code>friendly-welcome</code> ==== "shared ip" Tab ==== [[Image:Friendly SharedIP Tab.PNG|thumb|Friendly's shared IP functionality.]] The '''shared ip''' tab will tag the IP as a [[:Category:Shared IP addresses|shared IP address]]. Most of the [[:Category:Shared IP header templates|Shared IP templates]] require that the name of the organization that owns or operates the IP address be input. If one of these templates is selected, Friendly will require that you fill in the "Organization name" input field, which does support [[WP:MARKUP|wikitext]]. Tab element ID: <code>friendly-shared</code> === Article Namespace === ==== "tag" Tab ==== [[Image:Twinkle-tag-dialog.png|thumb|Friendly's tag functionality.]] The '''tag''' tab will tag the article with the template(s) of your choice. All templates that are checked will be added to the article in their proper respective locations. Templates that support it will automatically be added with the <code>date</code> parameter populated to the current month and year. If the "Group into <nowiki>{{Article issues}}</nowiki> if possible" checkbox is ticked, Friendly will group supported templates into an {{tl|Article issues}} template, if there are four or more. All other selected templates are then added to the article normally. If there are three or fewer selected templates that are supported by the {{tl|Article issues}} template, the setting is ignored, and all templates are added to the article normally. Three templates in the list, {{tl|globalize}}, {{tl|notability}}, and {{tl|current}}, allow you to select from a list of subcategories of the respective templates. The standard template is the default, and selecting a subcategory is not required, but it does place a more specific version of the template on the article. If a {{tl|globalize}} subcategory is selected and templates are being grouped into {{tl|Article issues}}, the subcategory is ignored as {{tl|Article issues}} only supports the standard {{tl|globalize}} template. The {{tl|notability}} subcategories are ignored in the same way when grouping. If the redirect URL parameter is set to "no" and there is no rcid URL parameter, the tag tab will assume that you are viewing a redirect page. Instead of presenting you with a normal set of article tags, the tab will present you with a set of redirect categorization tags, from [[:Category:Redirect templates]]. Tab element ID: <code>friendly-tag</code> --> == Installasjon == For å installere alle Friendly-modulene, inkludert alle fremtidige oppdateringer og tillegg: # kopier teksten under og lim den inn på bunnen av [[Special:Mypage/monobook.js|din monobook.js]]-fil: <syntaxhighlight lang=javascript>importScript('Bruker:Nsaa/friendly.js');</syntaxhighlight> # lagre den nye monobook.js-siden og # oppfrisk din nettleser ved å [[:en:Wikipedia:Bypass your cache|gå forbi mellomlageret]] (trykk Control-Shift-R i Firefox). Du ønsker kanskje å rekonfigurere Friendlys standardoppsett etter installasjon. Se [[#Konfigurasjon|under]] for instruksjoner. === Individuelle moduler === Hvis du bare vil bruke en eller flere individuelle moduler, er de listet her med deres avhengigheter. Linjen <code>importScript('Bruker:Nsaa/morebits.js);</code> (fra en:wp:<code>importScript('User:AzaToth/morebits.js');</code> er bare nødvendig en gang i din monobook.js, og Twinkle inkluderer den allerede (så du trenger den ikke om du allerede er Twinkle-bruker). Det anbefales at du ikke importerer et skript mer enn en gang, siden det da vil bli et duplikat, men <code>importScript();</code>-funksjonen har en sjekk for å sørge for at ikke skript importeres mer enn en gang. For velkomstfunksjonaliteten, legg til: importScript('[[Bruker:Nsaa/morebits.js]]'); importScript('[[Bruker:Nsaa/friendlywelcome.js]]'); For the shared IP tagging functionality, add: importScript('[[Bruker:Nsaa/morebits.js]]'); importScript('[[Bruker:Nsaa/friendlyshared.js]]'); For the tagging functionality, add: importScript('[[Bruker:Nsaa/morebits.js]]'); importScript('[[Bruker:Nsaa/friendlytag.js]]'); For the clock functionality, add: importScript('[[Bruker:Nsaa/morebits.js]]'); importScript('[[Bruker:Nsaa/friendlyclock.js]]'); For the tabs functionality, add: importScript('[[Bruker:Nsaa/morebits.js]]'); importScript('[[Bruker:Nsaa/friendlytabs.js]]'); For the talkback functionality, add: importScript('[[Bruker:Nsaa/morebits.js]]'); importScript('[[Bruker:Nsaa/friendlytalkback.js]]'); <!-- == Configuration == Optionally, to configure Friendly, copy the text below and paste it in [[Special:Mypage/monobook.js|your monobook.js]] file. It does not matter if you put the config before or after the includes or have Friendly installed as a gadget. Each line contains a specific setting which is described below. You can remove any settings that you do not want to change from the default, but do not remove the first line. When changing settings, make sure not to remove the semicolon from the end of each line. === Default Configuration === This is the default configuration: <source lang=javascript> if( typeof( FriendlyConfig ) == 'undefined' ) FriendlyConfig = {}; // DO NOT REMOVE THIS LINE - ALL FRIENDLY SETTINGS AFTER THIS FriendlyConfig.clockStyle = "dynamic"; FriendlyConfig.enableClock = true; FriendlyConfig.groupByDefault = true; FriendlyConfig.idsToRename = [ { id: 'ca-nstab-main', name: 'Main', mainPageOnly: true }, { id: 'ca-nstab-help', name: 'Help' }, { id: 'ca-nstab-special', name: 'Special' }, { id: 'ca-nstab-project', name: 'Project' }, { id: 'ca-nstab-user', name: 'User' }, { id: 'ca-edit', name: 'Edit' }, { id: 'ca-viewsource', name: 'Source' }, { id: 'ca-talk', name: 'Talk' }, { id: 'ca-undelete', name: 'Undelete' }, { id: 'ca-addsection', name: '+' } ]; FriendlyConfig.insertHeadings = true; FriendlyConfig.insertSignature = true; FriendlyConfig.insertUsername = true; FriendlyConfig.markSharedIPAsMinor = true; FriendlyConfig.markTaggedPagesAsMinor = true; FriendlyConfig.markTaggedPagesAsPatrolled = true; FriendlyConfig.markTalkbackAsMinor = true; FriendlyConfig.markWelcomesAsMinor = true; FriendlyConfig.maskTemplateInSummary = true; FriendlyConfig.quickWelcomeMode = "auto"; FriendlyConfig.quickWelcomeTemplate = "Welcome"; FriendlyConfig.summaryAd = " using [[WP:FRIENDLY|Friendly]]"; FriendlyConfig.talkbackHeading = "== Talkback =="; FriendlyConfig.topWelcomes = false; FriendlyConfig.watchTaggedPages = true; FriendlyConfig.watchWelcomes = true; FriendlyConfig.welcomeHeading = "== Welcome =="; </source> === Custom Configuration === Alternatively, you can copy only the settings you wish to change in the following format: <source lang=javascript> if( typeof( FriendlyConfig) == 'undefined' ) FriendlyConfig= {}; // DO NOT REMOVE THIS LINE - ALL FRIENDLY SETTINGS AFTER THIS FriendlyConfig.key = value; FriendlyConfig.key = value; /* ... */ FriendlyConfig.key = value; </source> === Parameter Descriptions === ==== clockStyle ==== Defines whether a static or dynamic clock should be displayed. The dynamic clock will update the time continuously, while the static clock will always display the time that you loaded the page. Valid parameter values are '''<code>dynamic</code>''' and '''<code>static</code>'''. Argument is a String, default to '''<code>dynamic</code>'''. ==== enableClock ==== Defines whether Friendly's clock should be shown. Argument is a boolean, default to '''<code>true</code>'''. ==== groupByDefault ==== Defines if the checkbox for template grouping should be checked by default. It is recommended that you '''not''' change this option. Argument is a boolean, default to '''<code>true</code>'''. ==== idsToRename ==== Defines the document ids for the tabs that Friendly's tab feature should rename. It is an array of hashes, with each hash containing an id that must be a string and a name that must be a string. If a matching id is found on the page you are currently browsing, Friendly changes the link name to what is defined in the name. If renaming the article tab (id: 'ca-nstab-main') you can also specify a boolean parameter called mainPageOnly in the hash. If set to true, the particular name for the id in this hash will only be used on Wikipedia's main page. Argument is an array of hashes, default to: <source lang=javascript>idsToRename : [ { id: 'ca-nstab-main', name: 'Main', mainPageOnly: true }, { id: 'ca-nstab-help', name: 'Help' }, { id: 'ca-nstab-special', name: 'Special' }, { id: 'ca-nstab-project', name: 'Project' }, { id: 'ca-nstab-user', name: 'User' }, { id: 'ca-edit', name: 'Edit' }, { id: 'ca-viewsource', name: 'Source' }, { id: 'ca-talk', name: 'Talk' }, { id: 'ca-undelete', name: 'Undelete' }, { id: 'ca-addsection', name: '+' } ]</source> To remove all tab renaming, replace this line with '''<code>[],</code>''' ==== insertHeadings ==== Defines whether a heading is added to a welcome template that does not already contain one. Argument is a boolean, default to '''<code>true</code>'''. ==== insertSignature ==== Defines whether a signature (<nowiki>~~~~</nowiki>) is added after the welcome template if the template has no signature. It is recommended that you '''not''' change this option. Argument is a boolean, default to '''<code>true</code>'''. ==== insertUsername ==== Defines if your username should be added to the template, if the template supports it. Example: {{tl2|welcome|Ioeth}}. Argument is a boolean, default to '''<code>true</code>'''. ==== markSharedIPAsMinor ==== Defines if adding a shared IP template should be marked as a minor edit. Argument is a boolean, default to '''<code>true</code>'''. ==== markTaggedPagesAsMinor ==== Defines if adding a tag should be marked as a minor edit. Argument is a boolean, default to '''<code>true</code>'''. ==== markTaggedPagesAsPatrolled ==== Defines if tagging should automatically mark the page as patrolled. Argument is a boolean, default to '''<code>true</code>'''. ==== markTalkbackAsMinor ==== Defines if adding a talkback template should be marked as a minor edit. Argument is a boolean, default to '''<code>true</code>'''. ==== markWelcomesAsMinor ==== Defines if adding a welcome should be marked as a minor edit. Argument is a boolean, default to '''<code>true</code>'''. ==== maskTemplateInSummary ==== Defines whether Friendly will reference the specific template you used in the edit summary. This is useful if you do not want welcomed users to see that you welcomed them with {{tl|welcomevandal}}, for instance. Argument is a boolean, default to <code>true</code>. ==== quickWelcomeMode ==== Defines which quick welcome mode Friendly will operate in when welcoming a new user directly from a historical diff page. Automatic mode will add the template defined in the '''<code>quickWelcomeTemplate</code>''' variable to the user's talk page with no user intervention. Semi-automatic mode will load the user's talk page and then prompt you with the welcome template list as if you clicked the "welcome" tab. The value of this argument must either be '''<code>auto</code>''' or '''<code>semiauto</code>'''. Argument is a string, default to '''<code>auto</code>'''. ==== quickWelcomeTemplate ==== Defines which welcome template Friendly will use when welcoming a new user directly from a historical diff page. The value of this argument must exactly match one of the templates available from the "welcome" tab on a user talk page. '''Do not include the curly braces''', only the template name, and make sure the capitalization matches. Argument is a string, default to '''<code>Welcome</code>'''. ==== summaryAd ==== Defines what summary Ad to be added. Argument is a string, default to '''<code><nowiki> using [[WP:FRIENDLY|Friendly]]</nowiki></code>'''. ==== talkbackHeading ==== Defines what heading is to be added above talkback templates if '''<code>insertHeadings</code>''' is true. Argument is a string, default to '''<code><nowiki>== Talkback ==</nowiki></code>'''. ==== topWelcomes ==== Defines if the welcome should be added to the top or bottom of the user's talk page. Argument is a boolean, default to '''<code>false</code>'''. ==== watchTaggedPages ==== Defines if adding a tag should add a page to watchlist. Argument is a boolean, default to '''<code>true</code>'''. ==== watchWelcomes ==== Defines if adding a welcome should add page to watchlist. Argument is a boolean, default to '''<code>true</code>'''. ==== welcomeHeading ==== Defines what heading is to be added to welcome templates if '''<code>insertHeadings</code>''' is true and the welcome template has no heading. Argument is a string, default to '''<code><nowiki>== Welcome ==</nowiki></code>'''. === Custom Parameters === Friendly's tag and welcome functionality supports custom maintenance and welcome templates which are provided to the script by adding the '''<code>customTagList</code>''' and '''<code>customWelcomeList</code>''' parameters to FriendlyConfig. This functionality is somewhat complex to set up, so it is not recommended for users that are inexperienced with JavaScript. If you require assistance, please post a message on [[WT:FRIENDLY|the talk page]] and someone will most likely come along to help you out. ==== customTagList ==== To add custom template functionality to your Friendly tag screen, insert the following code below your other Friendly configuration: <source lang=javascript> FriendlyConfig.customTagList = [ { label: '{{CustomTag}}: Custom maintenance template description', value: 'CustomTag' }, { label: '{{CustomTag}}: Custom maintenance template description', value: 'CustomTag' }, { label: '{{CustomTag}}: Custom maintenance template description (now includes parameters!)', value: 'CustomTag|para=value' } ]; </source> Simply replace "CustomTag" with the name of the template that you would like to add to the script and either remove or replace the description on the "label" line. This section of your configuration can be extended to include as many custom maintenance templates as you would like. Make sure to use a comma to separate each element in the array while not including one after the last element. ==== customWelcomeList ==== To add custom template functionality to your Friendly welcome screen, insert the following code below your other Friendly configuration: <source lang=javascript> FriendlyConfig.customWelcomeList = [ { label: '{{CustomWelcome}}: Custom welcome template description', value: 'CustomWelcome' }, { label: '{{CustomWelcome}}: Custom welcome template description', value: 'CustomWelcome' }, { label: '{{CustomWelcome}}: Custom welcome template description (now includes parameters!)', value: 'CustomWelcome|para=value' } ]; </source> Simply replace "CustomWelcome" with the name of the template that you would like to add to the script and either remove or replace the description on the "label" line. This section of your configuration can be extended to include as many custom welcome templates as you would like. Make sure to use a comma to separate each element in the array while not including one after the last element. == Userboxes == Friendly users may add these userboxes to [[Special:MyPage|their userpage]]. {| class="wikitable" |- ! width="238px" | Userbox ! width="325px" | Code |- | {{User:Xenon54/Userboxes/Friendly}} | align="center" | '''{{tlu|User:Xenon54/Userboxes/Friendly}}''' |- | {{User:Xenon54/Userboxes/Friendly2}} | align="center" | '''{{tlu|User:Xenon54/Userboxes/Friendly2}}''' |- | {{User:Xenon54/Userboxes/Friendly3}} | align="center" | '''{{tlu|User:Xenon54/Userboxes/Friendly3}}''' |- | {{User:Arctic Fox/UBX/Friendly}} | align="center" | '''{{tlu|User:Arctic Fox/UBX/Friendly}}''' |- | {{User:Powergate92/Userboxes/Friendly}} | align="center" | '''{{tlu|User:Powergate92/Userboxes/Friendly}}''' |- | {{User:Skittleys/Userboxes/Friendly}} | align="center" | '''{{tlu|User:Skittleys/Userboxes/Friendly|tag{{=}}TAGNAME}}''' |} --> [[Category:Wikipedia-skript]] [[en:Wikipedia:Twinkle]] [[zh:Wikipedia:維基百科工具/Friendly]]
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Maler som brukes på denne siden:
Mal:Ikke omdirigering
(
rediger
)
Mal:Snarvei
(
rediger
)
Mal:TOC right
(
rediger
)
Mal:Tocright
(
rediger
)
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Prosjektside
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon